Ignore:
Timestamp:
Apr 25, 2008, 7:02:31 PM (17 years ago)
Author:
[email protected]
Message:

2008-04-25 Sam Weinig <[email protected]>

Rubber-stamped by Mark Rowe.

Remove SavedBuiltins and SavedProperties classes and the methods used to
save data to them. The CachedPage now stores a the JSGlobalObject in full.

  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • kjs/JSGlobalObject.cpp:
  • kjs/JSGlobalObject.h:
  • kjs/JSVariableObject.cpp:
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::localStorage):
  • kjs/SavedBuiltins.h: Removed.
  • kjs/object.h:
  • kjs/property_map.cpp:
  • kjs/property_map.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSGlobalObject.cpp

    r32495 r32587  
    3232
    3333#include "Activation.h"
    34 #include "SavedBuiltins.h"
    3534#include "array_object.h"
    3635#include "bool_object.h"
     
    412411}
    413412
    414 void JSGlobalObject::saveBuiltins(SavedBuiltins& builtins) const
    415 {
    416     if (!builtins._internal)
    417         builtins._internal = new SavedBuiltinsInternal;
    418 
    419     builtins._internal->objectConstructor = d()->objectConstructor;
    420     builtins._internal->functionConstructor = d()->functionConstructor;
    421     builtins._internal->arrayConstructor = d()->arrayConstructor;
    422     builtins._internal->booleanConstructor = d()->booleanConstructor;
    423     builtins._internal->stringConstructor = d()->stringConstructor;
    424     builtins._internal->numberConstructor = d()->numberConstructor;
    425     builtins._internal->dateConstructor = d()->dateConstructor;
    426     builtins._internal->regExpConstructor = d()->regExpConstructor;
    427     builtins._internal->errorConstructor = d()->errorConstructor;
    428     builtins._internal->evalErrorConstructor = d()->evalErrorConstructor;
    429     builtins._internal->rangeErrorConstructor = d()->rangeErrorConstructor;
    430     builtins._internal->referenceErrorConstructor = d()->referenceErrorConstructor;
    431     builtins._internal->syntaxErrorConstructor = d()->syntaxErrorConstructor;
    432     builtins._internal->typeErrorConstructor = d()->typeErrorConstructor;
    433     builtins._internal->URIErrorConstructor = d()->URIErrorConstructor;
    434    
    435     builtins._internal->evalFunction = d()->evalFunction;
    436    
    437     builtins._internal->objectPrototype = d()->objectPrototype;
    438     builtins._internal->functionPrototype = d()->functionPrototype;
    439     builtins._internal->arrayPrototype = d()->arrayPrototype;
    440     builtins._internal->booleanPrototype = d()->booleanPrototype;
    441     builtins._internal->stringPrototype = d()->stringPrototype;
    442     builtins._internal->numberPrototype = d()->numberPrototype;
    443     builtins._internal->datePrototype = d()->datePrototype;
    444     builtins._internal->regExpPrototype = d()->regExpPrototype;
    445     builtins._internal->errorPrototype = d()->errorPrototype;
    446     builtins._internal->evalErrorPrototype = d()->evalErrorPrototype;
    447     builtins._internal->rangeErrorPrototype = d()->rangeErrorPrototype;
    448     builtins._internal->referenceErrorPrototype = d()->referenceErrorPrototype;
    449     builtins._internal->syntaxErrorPrototype = d()->syntaxErrorPrototype;
    450     builtins._internal->typeErrorPrototype = d()->typeErrorPrototype;
    451     builtins._internal->URIErrorPrototype = d()->URIErrorPrototype;
    452 }
    453 
    454 void JSGlobalObject::restoreBuiltins(const SavedBuiltins& builtins)
    455 {
    456     if (!builtins._internal)
    457         return;
    458 
    459     d()->objectConstructor = builtins._internal->objectConstructor;
    460     d()->functionConstructor = builtins._internal->functionConstructor;
    461     d()->arrayConstructor = builtins._internal->arrayConstructor;
    462     d()->booleanConstructor = builtins._internal->booleanConstructor;
    463     d()->stringConstructor = builtins._internal->stringConstructor;
    464     d()->numberConstructor = builtins._internal->numberConstructor;
    465     d()->dateConstructor = builtins._internal->dateConstructor;
    466     d()->regExpConstructor = builtins._internal->regExpConstructor;
    467     d()->errorConstructor = builtins._internal->errorConstructor;
    468     d()->evalErrorConstructor = builtins._internal->evalErrorConstructor;
    469     d()->rangeErrorConstructor = builtins._internal->rangeErrorConstructor;
    470     d()->referenceErrorConstructor = builtins._internal->referenceErrorConstructor;
    471     d()->syntaxErrorConstructor = builtins._internal->syntaxErrorConstructor;
    472     d()->typeErrorConstructor = builtins._internal->typeErrorConstructor;
    473     d()->URIErrorConstructor = builtins._internal->URIErrorConstructor;
    474    
    475     d()->evalFunction = builtins._internal->evalFunction;
    476 
    477     d()->objectPrototype = builtins._internal->objectPrototype;
    478     d()->functionPrototype = builtins._internal->functionPrototype;
    479     d()->arrayPrototype = builtins._internal->arrayPrototype;
    480     d()->booleanPrototype = builtins._internal->booleanPrototype;
    481     d()->stringPrototype = builtins._internal->stringPrototype;
    482     d()->numberPrototype = builtins._internal->numberPrototype;
    483     d()->datePrototype = builtins._internal->datePrototype;
    484     d()->regExpPrototype = builtins._internal->regExpPrototype;
    485     d()->errorPrototype = builtins._internal->errorPrototype;
    486     d()->evalErrorPrototype = builtins._internal->evalErrorPrototype;
    487     d()->rangeErrorPrototype = builtins._internal->rangeErrorPrototype;
    488     d()->referenceErrorPrototype = builtins._internal->referenceErrorPrototype;
    489     d()->syntaxErrorPrototype = builtins._internal->syntaxErrorPrototype;
    490     d()->typeErrorPrototype = builtins._internal->typeErrorPrototype;
    491     d()->URIErrorPrototype = builtins._internal->URIErrorPrototype;
    492 }
    493 
    494413void JSGlobalObject::mark()
    495414{
Note: See TracChangeset for help on using the changeset viewer.