[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:46:45 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d384b39523d0ac9356af9fc7be971a65c969b5cf
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 10 21:18:25 2003 +0000

    JavaScriptCore:
    
            Reviewed by Darin.
    
    	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
    
    	The crux of this was saving and restoring the prototype objects
    	for all the standard types when saving and restoring for the page
    	cache.
    
            * kjs/internal.cpp:
            (InterpreterImp::saveBuiltins):
            (InterpreterImp::restoreBuiltins):
            * kjs/internal.h:
            * kjs/interpreter.cpp:
            (Interpreter::saveBuiltins):
            (Interpreter::restoreBuiltins):
            (SavedBuiltins::SavedBuiltins):
            (SavedBuiltins::~SavedBuiltins):
            * kjs/interpreter.h:
            * kjs/property_map.cpp:
    
    WebCore:
    
            Reviewed by Darin.
    
    	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
    	- fixed a bug with saving and restoring location object properties
    
            * kwq/KWQKHTMLPart.h:
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::saveLocationProperties): Save the location object's properties, not
    	the window's (!)
            (KWQKHTMLPart::saveInterpreterBuiltins): New function to save builtin properties of
    	the interpeter.
            (KWQKHTMLPart::restoreInterpreterBuiltins): Similarly to restore them.
            (KWQKHTMLPart::openURLFromPageCache): Restore interpreter builtins too.
            * kwq/KWQPageState.h:
            * kwq/KWQPageState.mm:
            (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): Handle interpreter builtins.
            (-[KWQPageState invalidate]): Likewise.
            (-[KWQPageState dealloc]): Likewise.
            (-[KWQPageState interpreterBuiltins]): New method.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge saveDocumentToPageCache]): Handle interpeter builtins.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 037674d..96cc96a 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,25 @@
+2003-07-10  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
+
+	The crux of this was saving and restoring the prototype objects
+	for all the standard types when saving and restoring for the page
+	cache.
+	
+        * kjs/internal.cpp:
+        (InterpreterImp::saveBuiltins):
+        (InterpreterImp::restoreBuiltins):
+        * kjs/internal.h:
+        * kjs/interpreter.cpp:
+        (Interpreter::saveBuiltins):
+        (Interpreter::restoreBuiltins):
+        (SavedBuiltins::SavedBuiltins):
+        (SavedBuiltins::~SavedBuiltins):
+        * kjs/interpreter.h:
+        * kjs/property_map.cpp:
+
 2003-07-07  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by John.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 037674d..96cc96a 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,25 @@
+2003-07-10  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
+
+	The crux of this was saving and restoring the prototype objects
+	for all the standard types when saving and restoring for the page
+	cache.
+	
+        * kjs/internal.cpp:
+        (InterpreterImp::saveBuiltins):
+        (InterpreterImp::restoreBuiltins):
+        * kjs/internal.h:
+        * kjs/interpreter.cpp:
+        (Interpreter::saveBuiltins):
+        (Interpreter::restoreBuiltins):
+        (SavedBuiltins::SavedBuiltins):
+        (SavedBuiltins::~SavedBuiltins):
+        * kjs/interpreter.h:
+        * kjs/property_map.cpp:
+
 2003-07-07  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by John.
diff --git a/JavaScriptCore/kjs/internal.cpp b/JavaScriptCore/kjs/internal.cpp
index 4ed1e4b..00666e4 100644
--- a/JavaScriptCore/kjs/internal.cpp
+++ b/JavaScriptCore/kjs/internal.cpp
@@ -546,7 +546,7 @@ void InterpreterImp::unlock()
   unlockInterpreter();
 }
 
-void InterpreterImp::initGlobalObject()
+ void InterpreterImp::initGlobalObject()
 {
   Identifier::init();
   
@@ -822,6 +822,88 @@ void InterpreterImp::setDebugger(Debugger *d)
   dbg = d;
 }
 
+void InterpreterImp::saveBuiltins (SavedBuiltins &builtins) const
+{
+  if (!builtins._internal) {
+    builtins._internal = new SavedBuiltinsInternal;
+  }
+
+  builtins._internal->b_Object = b_Object;
+  builtins._internal->b_Function = b_Function;
+  builtins._internal->b_Array = b_Array;
+  builtins._internal->b_Boolean = b_Boolean;
+  builtins._internal->b_String = b_String;
+  builtins._internal->b_Number = b_Number;
+  builtins._internal->b_Date = b_Date;
+  builtins._internal->b_RegExp = b_RegExp;
+  builtins._internal->b_Error = b_Error;
+  
+  builtins._internal->b_ObjectPrototype = b_ObjectPrototype;
+  builtins._internal->b_FunctionPrototype = b_FunctionPrototype;
+  builtins._internal->b_ArrayPrototype = b_ArrayPrototype;
+  builtins._internal->b_BooleanPrototype = b_BooleanPrototype;
+  builtins._internal->b_StringPrototype = b_StringPrototype;
+  builtins._internal->b_NumberPrototype = b_NumberPrototype;
+  builtins._internal->b_DatePrototype = b_DatePrototype;
+  builtins._internal->b_RegExpPrototype = b_RegExpPrototype;
+  builtins._internal->b_ErrorPrototype = b_ErrorPrototype;
+  
+  builtins._internal->b_evalError = b_evalError;
+  builtins._internal->b_rangeError = b_rangeError;
+  builtins._internal->b_referenceError = b_referenceError;
+  builtins._internal->b_syntaxError = b_syntaxError;
+  builtins._internal->b_typeError = b_typeError;
+  builtins._internal->b_uriError = b_uriError;
+  
+  builtins._internal->b_evalErrorPrototype = b_evalErrorPrototype;
+  builtins._internal->b_rangeErrorPrototype = b_rangeErrorPrototype;
+  builtins._internal->b_referenceErrorPrototype = b_referenceErrorPrototype;
+  builtins._internal->b_syntaxErrorPrototype = b_syntaxErrorPrototype;
+  builtins._internal->b_typeErrorPrototype = b_typeErrorPrototype;
+  builtins._internal->b_uriErrorPrototype = b_uriErrorPrototype;
+}
+
+void InterpreterImp::restoreBuiltins (const SavedBuiltins &builtins)
+{
+  if (!builtins._internal) {
+    return;
+  }
+
+  b_Object = builtins._internal->b_Object;
+  b_Function = builtins._internal->b_Function;
+  b_Array = builtins._internal->b_Array;
+  b_Boolean = builtins._internal->b_Boolean;
+  b_String = builtins._internal->b_String;
+  b_Number = builtins._internal->b_Number;
+  b_Date = builtins._internal->b_Date;
+  b_RegExp = builtins._internal->b_RegExp;
+  b_Error = builtins._internal->b_Error;
+  
+  b_ObjectPrototype = builtins._internal->b_ObjectPrototype;
+  b_FunctionPrototype = builtins._internal->b_FunctionPrototype;
+  b_ArrayPrototype = builtins._internal->b_ArrayPrototype;
+  b_BooleanPrototype = builtins._internal->b_BooleanPrototype;
+  b_StringPrototype = builtins._internal->b_StringPrototype;
+  b_NumberPrototype = builtins._internal->b_NumberPrototype;
+  b_DatePrototype = builtins._internal->b_DatePrototype;
+  b_RegExpPrototype = builtins._internal->b_RegExpPrototype;
+  b_ErrorPrototype = builtins._internal->b_ErrorPrototype;
+  
+  b_evalError = builtins._internal->b_evalError;
+  b_rangeError = builtins._internal->b_rangeError;
+  b_referenceError = builtins._internal->b_referenceError;
+  b_syntaxError = builtins._internal->b_syntaxError;
+  b_typeError = builtins._internal->b_typeError;
+  b_uriError = builtins._internal->b_uriError;
+  
+  b_evalErrorPrototype = builtins._internal->b_evalErrorPrototype;
+  b_rangeErrorPrototype = builtins._internal->b_rangeErrorPrototype;
+  b_referenceErrorPrototype = builtins._internal->b_referenceErrorPrototype;
+  b_syntaxErrorPrototype = builtins._internal->b_syntaxErrorPrototype;
+  b_typeErrorPrototype = builtins._internal->b_typeErrorPrototype;
+  b_uriErrorPrototype = builtins._internal->b_uriErrorPrototype;
+}
+
 // ------------------------------ InternalFunctionImp --------------------------
 
 const ClassInfo InternalFunctionImp::info = {"Function", 0, 0, 0};
diff --git a/JavaScriptCore/kjs/internal.h b/JavaScriptCore/kjs/internal.h
index 3c2786f..bcd5fb3 100644
--- a/JavaScriptCore/kjs/internal.h
+++ b/JavaScriptCore/kjs/internal.h
@@ -211,6 +211,44 @@ namespace KJS {
     static int sid;
   };
 
+  class SavedBuiltinsInternal {
+    friend class InterpreterImp;
+  private:
+    Object b_Object;
+    Object b_Function;
+    Object b_Array;
+    Object b_Boolean;
+    Object b_String;
+    Object b_Number;
+    Object b_Date;
+    Object b_RegExp;
+    Object b_Error;
+
+    Object b_ObjectPrototype;
+    Object b_FunctionPrototype;
+    Object b_ArrayPrototype;
+    Object b_BooleanPrototype;
+    Object b_StringPrototype;
+    Object b_NumberPrototype;
+    Object b_DatePrototype;
+    Object b_RegExpPrototype;
+    Object b_ErrorPrototype;
+
+    Object b_evalError;
+    Object b_rangeError;
+    Object b_referenceError;
+    Object b_syntaxError;
+    Object b_typeError;
+    Object b_uriError;
+
+    Object b_evalErrorPrototype;
+    Object b_rangeErrorPrototype;
+    Object b_referenceErrorPrototype;
+    Object b_syntaxErrorPrototype;
+    Object b_typeErrorPrototype;
+    Object b_uriErrorPrototype;
+  };
+
   class InterpreterImp {
     friend class Collector;
   public:
@@ -280,6 +318,9 @@ namespace KJS {
     
     void setContext(ContextImp *c) { _context = c; }
 
+    void saveBuiltins (SavedBuiltins &builtins) const;
+    void restoreBuiltins (const SavedBuiltins &builtins);
+
   private:
     void clear();
     Interpreter *m_interpreter;
diff --git a/JavaScriptCore/kjs/interpreter.cpp b/JavaScriptCore/kjs/interpreter.cpp
index e5b6cbb..b00efe8 100644
--- a/JavaScriptCore/kjs/interpreter.cpp
+++ b/JavaScriptCore/kjs/interpreter.cpp
@@ -331,5 +331,26 @@ void Interpreter::setShouldPrintExceptions(bool print)
 }
 #endif
 
+void Interpreter::saveBuiltins (SavedBuiltins &builtins) const
+{
+  rep->saveBuiltins(builtins);
+}
+
+void Interpreter::restoreBuiltins (const SavedBuiltins &builtins)
+{
+  rep->restoreBuiltins(builtins);
+}
+
+SavedBuiltins::SavedBuiltins() : 
+  _internal(0)
+{
+}
+
+SavedBuiltins::~SavedBuiltins()
+{
+  delete _internal;
+}
+
+
 void Interpreter::virtual_hook( int, void* )
 { /*BASE::virtual_hook( id, data );*/ }
diff --git a/JavaScriptCore/kjs/interpreter.h b/JavaScriptCore/kjs/interpreter.h
index 5c00805..c589497 100644
--- a/JavaScriptCore/kjs/interpreter.h
+++ b/JavaScriptCore/kjs/interpreter.h
@@ -106,6 +106,17 @@ namespace KJS {
     ContextImp *rep;
   };
 
+  class SavedBuiltinsInternal;
+
+  class SavedBuiltins {
+    friend class InterpreterImp;
+  public:
+    SavedBuiltins();
+    ~SavedBuiltins();
+  private:
+    SavedBuiltinsInternal *_internal;
+  };
+
   /**
    * Interpreter objects can be used to evaluate ECMAScript code. Each
    * interpreter has a global object which is used for the purposes of code
@@ -344,6 +355,9 @@ namespace KJS {
     static void setShouldPrintExceptions(bool);
 #endif
 
+    void saveBuiltins (SavedBuiltins &) const;
+    void restoreBuiltins (const SavedBuiltins &);
+    
   private:
     InterpreterImp *rep;
 
diff --git a/JavaScriptCore/kjs/property_map.cpp b/JavaScriptCore/kjs/property_map.cpp
index 5fb2c0f..ceeb67a 100644
--- a/JavaScriptCore/kjs/property_map.cpp
+++ b/JavaScriptCore/kjs/property_map.cpp
@@ -555,12 +555,12 @@ void PropertyMap::save(SavedProperties &p) const
 
     if (!_table) {
 #if USE_SINGLE_ENTRY
-        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function)))
+        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | Function)))
             ++count;
 #endif
     } else {
         for (int i = 0; i != _table->size; ++i)
-            if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | DontEnum | Function)))
+            if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | Function)))
                 ++count;
     }
 
@@ -579,7 +579,7 @@ void PropertyMap::save(SavedProperties &p) const
     
     if (!_table) {
 #if USE_SINGLE_ENTRY
-        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function))) {
+        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | Function))) {
             prop->key = Identifier(_singleEntry.key);
             prop->value = Value(_singleEntry.value);
             prop->attributes = _singleEntry.attributes;
@@ -602,7 +602,7 @@ void PropertyMap::save(SavedProperties &p) const
         Entry **p = sortedEntries;
         for (int i = 0; i != _table->size; ++i) {
             Entry *e = &_table->entries[i];
-            if (e->key && !(e->attributes & (ReadOnly | DontEnum | Function)))
+            if (e->key && !(e->attributes & (ReadOnly | Function)))
                 *p++ = e;
         }
         assert(p - sortedEntries == count);
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5de0332..b818177 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2003-07-10  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
+	- fixed a bug with saving and restoring location object properties
+	
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::saveLocationProperties): Save the location object's properties, not
+	the window's (!)
+        (KWQKHTMLPart::saveInterpreterBuiltins): New function to save builtin properties of
+	the interpeter.
+        (KWQKHTMLPart::restoreInterpreterBuiltins): Similarly to restore them.
+        (KWQKHTMLPart::openURLFromPageCache): Restore interpreter builtins too.
+        * kwq/KWQPageState.h:
+        * kwq/KWQPageState.mm:
+        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): Handle interpreter builtins.
+        (-[KWQPageState invalidate]): Likewise.
+        (-[KWQPageState dealloc]): Likewise.
+        (-[KWQPageState interpreterBuiltins]): New method.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge saveDocumentToPageCache]): Handle interpeter builtins.
+
 2003-07-10  Darin Adler  <darin at apple.com>
 
         Reviewed by Chris.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5de0332..b818177 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2003-07-10  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
+	- fixed a bug with saving and restoring location object properties
+	
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::saveLocationProperties): Save the location object's properties, not
+	the window's (!)
+        (KWQKHTMLPart::saveInterpreterBuiltins): New function to save builtin properties of
+	the interpeter.
+        (KWQKHTMLPart::restoreInterpreterBuiltins): Similarly to restore them.
+        (KWQKHTMLPart::openURLFromPageCache): Restore interpreter builtins too.
+        * kwq/KWQPageState.h:
+        * kwq/KWQPageState.mm:
+        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): Handle interpreter builtins.
+        (-[KWQPageState invalidate]): Likewise.
+        (-[KWQPageState dealloc]): Likewise.
+        (-[KWQPageState interpreterBuiltins]): New method.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge saveDocumentToPageCache]): Handle interpeter builtins.
+
 2003-07-10  Darin Adler  <darin at apple.com>
 
         Reviewed by Chris.
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 73bbdbc..5a50b4d 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -43,6 +43,7 @@ namespace khtml {
 
 namespace KJS {
     class SavedProperties;
+    class SavedBuiltins;
     class ScheduledAction;
 }
 
@@ -118,6 +119,9 @@ public:
     void saveLocationProperties(KJS::SavedProperties *locationProperties);
     void restoreWindowProperties(KJS::SavedProperties *windowProperties);
     void restoreLocationProperties(KJS::SavedProperties *locationProperties);
+    void saveInterpreterBuiltins(KJS::SavedBuiltins &interpreterBuiltins);
+    void restoreInterpreterBuiltins(const KJS::SavedBuiltins &interpreterBuiltins);
+
     void openURLFromPageCache(KWQPageState *state);
 
     void saveDocumentState();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 2e2e675..85d3774 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -80,6 +80,7 @@ using khtml::VISIBLE;
 using KIO::Job;
 
 using KJS::SavedProperties;
+using KJS::SavedBuiltins;
 using KJS::ScheduledAction;
 using KJS::Window;
 
@@ -950,7 +951,7 @@ void KWQKHTMLPart::saveLocationProperties(SavedProperties *locationProperties)
 {
     Window *window = Window::retrieveWindow(this);
     if (window)
-        window->saveProperties(*locationProperties);
+        window->location()->saveProperties(*locationProperties);
     else
         ERROR("NULL window");
 }
@@ -973,6 +974,16 @@ void KWQKHTMLPart::restoreLocationProperties(SavedProperties *locationProperties
         ERROR("NULL window");
 }
 
+void KWQKHTMLPart::saveInterpreterBuiltins(SavedBuiltins &interpreterBuiltins)
+{
+    jScript()->interpreter()->saveBuiltins(interpreterBuiltins);
+}
+
+void KWQKHTMLPart::restoreInterpreterBuiltins(const SavedBuiltins &interpreterBuiltins)
+{
+    jScript()->interpreter()->restoreBuiltins(interpreterBuiltins);
+}
+
 void KWQKHTMLPart::openURLFromPageCache(KWQPageState *state)
 {
     DocumentImpl *doc = [state document];
@@ -980,6 +991,7 @@ void KWQKHTMLPart::openURLFromPageCache(KWQPageState *state)
     KURL *url = [state URL];
     SavedProperties *windowProperties = [state windowProperties];
     SavedProperties *locationProperties = [state locationProperties];
+    SavedBuiltins *interpreterBuiltins = [state interpreterBuiltins];
     QMap<int, ScheduledAction*> *actions = [state pausedActions];
     
     cancelRedirection();
@@ -1037,6 +1049,7 @@ void KWQKHTMLPart::openURLFromPageCache(KWQPageState *state)
         
     restoreWindowProperties (windowProperties);
     restoreLocationProperties (locationProperties);
+    restoreInterpreterBuiltins (*interpreterBuiltins);
 
     if (actions)
         resumeActions (actions, state);
diff --git a/WebCore/kwq/KWQPageState.h b/WebCore/kwq/KWQPageState.h
index 5650c0a..17730ea 100644
--- a/WebCore/kwq/KWQPageState.h
+++ b/WebCore/kwq/KWQPageState.h
@@ -49,16 +49,18 @@ namespace KJS {
     KURL *URL;
     KJS::SavedProperties *windowProperties;
     KJS::SavedProperties *locationProperties;
+    KJS::SavedBuiltins *interpreterBuiltins;
     khtml::RenderObject *docRenderer; 
     QMap<int, KJS::ScheduledAction*> *pausedActions;
 }
 
-- initWithDocument:(DOM::DocumentImpl *)doc URL:(const KURL &)u windowProperties:(KJS::SavedProperties *)wp locationProperties:(KJS::SavedProperties *)lp;
+- initWithDocument:(DOM::DocumentImpl *)doc URL:(const KURL &)u windowProperties:(KJS::SavedProperties *)wp locationProperties:(KJS::SavedProperties *)lp interpreterBuiltins:(KJS::SavedBuiltins *)ib;
 
 - (DOM::DocumentImpl *)document;
 - (KURL *)URL;
 - (KJS::SavedProperties *)windowProperties;
 - (KJS::SavedProperties *)locationProperties;
+- (KJS::SavedBuiltins *)interpreterBuiltins;
 - (khtml::RenderObject *)renderer;
 - (void)setPausedActions: (QMap<int, KJS::ScheduledAction*> *)pa;
 - (QMap<int, KJS::ScheduledAction*> *)pausedActions;
diff --git a/WebCore/kwq/KWQPageState.mm b/WebCore/kwq/KWQPageState.mm
index c218c15..9d9e118 100644
--- a/WebCore/kwq/KWQPageState.mm
+++ b/WebCore/kwq/KWQPageState.mm
@@ -39,10 +39,11 @@ using DOM::DocumentImpl;
 using khtml::RenderObject;
 
 using KJS::SavedProperties;
+using KJS::SavedBuiltins;
 
 @implementation KWQPageState
 
-- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp
+- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp interpreterBuiltins:(SavedBuiltins *)ib
 {
     [super init];
     doc->ref();
@@ -53,6 +54,7 @@ using KJS::SavedProperties;
     URL = new KURL(u);
     windowProperties = wp;
     locationProperties = lp;
+    interpreterBuiltins = ib;
     return self;
 }
 
@@ -108,6 +110,8 @@ using KJS::SavedProperties;
     windowProperties = 0;
     delete locationProperties;
     locationProperties = 0;
+    delete interpreterBuiltins;
+    interpreterBuiltins = 0;
 }
 
 - (void)dealloc
@@ -131,6 +135,7 @@ using KJS::SavedProperties;
     delete URL;
     delete windowProperties;
     delete locationProperties;
+    delete interpreterBuiltins;
     
     [self _cleanupPausedActions];
 
@@ -157,6 +162,11 @@ using KJS::SavedProperties;
     return locationProperties;
 }
 
+- (SavedBuiltins *)interpreterBuiltins
+{
+    return interpreterBuiltins;
+}
+
 - (RenderObject *)renderer
 {
     return docRenderer;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 389e3a8..8dbf9b2 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -77,6 +77,7 @@ using khtml::RenderStyle;
 using khtml::RenderCanvas;
 
 using KJS::SavedProperties;
+using KJS::SavedBuiltins;
 
 using KParts::URLArgs;
 
@@ -269,10 +270,14 @@ static bool initializedObjectCacheSize = FALSE;
     SavedProperties *locationProperties = new SavedProperties;
     _part->saveLocationProperties(locationProperties);
     
+    SavedBuiltins *interpreterBuiltins = new SavedBuiltins;
+    _part->saveInterpreterBuiltins(*interpreterBuiltins);
+
     KWQPageState *pageState = [[[KWQPageState alloc] initWithDocument:doc
                                                                   URL:_part->m_url
                                                      windowProperties:windowProperties
-                                                   locationProperties:locationProperties] autorelease];
+                                                   locationProperties:locationProperties
+				                  interpreterBuiltins:interpreterBuiltins] autorelease];
 
 
     [pageState setPausedActions: _part->pauseActions((const void *)pageState)];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list