Changeset 4612 in webkit for trunk/JavaScriptCore/kjs/internal.h


Ignore:
Timestamp:
Jul 10, 2003, 2:18:25 PM (22 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Darin.

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.

  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.h

    r4087 r4612  
    212212  };
    213213
     214  class SavedBuiltinsInternal {
     215    friend class InterpreterImp;
     216  private:
     217    Object b_Object;
     218    Object b_Function;
     219    Object b_Array;
     220    Object b_Boolean;
     221    Object b_String;
     222    Object b_Number;
     223    Object b_Date;
     224    Object b_RegExp;
     225    Object b_Error;
     226
     227    Object b_ObjectPrototype;
     228    Object b_FunctionPrototype;
     229    Object b_ArrayPrototype;
     230    Object b_BooleanPrototype;
     231    Object b_StringPrototype;
     232    Object b_NumberPrototype;
     233    Object b_DatePrototype;
     234    Object b_RegExpPrototype;
     235    Object b_ErrorPrototype;
     236
     237    Object b_evalError;
     238    Object b_rangeError;
     239    Object b_referenceError;
     240    Object b_syntaxError;
     241    Object b_typeError;
     242    Object b_uriError;
     243
     244    Object b_evalErrorPrototype;
     245    Object b_rangeErrorPrototype;
     246    Object b_referenceErrorPrototype;
     247    Object b_syntaxErrorPrototype;
     248    Object b_typeErrorPrototype;
     249    Object b_uriErrorPrototype;
     250  };
     251
    214252  class InterpreterImp {
    215253    friend class Collector;
     
    281319    void setContext(ContextImp *c) { _context = c; }
    282320
     321    void saveBuiltins (SavedBuiltins &builtins) const;
     322    void restoreBuiltins (const SavedBuiltins &builtins);
     323
    283324  private:
    284325    void clear();
Note: See TracChangeset for help on using the changeset viewer.