Ignore:
Timestamp:
Apr 28, 2008, 11:22:14 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Fix run-webkit-tests --threading
and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
Proxy server issue in Sunday's Nightly

Changed ClassInfo objects for built-in objects to hold a getter function returning
a per-thread instance. This makes it safe to share these ClassInfo objects between threads -
and these are the only ones that need to be shared.

File:
1 edited

Legend:

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

    r31208 r32652  
    4747// ECMA 15.10.5
    4848
    49 const ClassInfo RegExpPrototype::info = { "RegExpPrototype", 0, 0 };
     49const ClassInfo RegExpPrototype::info = { "RegExpPrototype", 0, 0, 0 };
    5050
    5151RegExpPrototype::RegExpPrototype(ExecState* exec, ObjectPrototype* objectPrototype, FunctionPrototype* functionPrototype)
    5252    : JSObject(objectPrototype)
    5353{
    54     putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, CommonIdentifiers::shared()->compile, regExpProtoFuncCompile), DontEnum);
    55     putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, CommonIdentifiers::shared()->exec, regExpProtoFuncExec), DontEnum);
    56     putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, CommonIdentifiers::shared()->test, regExpProtoFuncTest), DontEnum);
     54    putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, exec->propertyNames().compile, regExpProtoFuncCompile), DontEnum);
     55    putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, exec->propertyNames().exec, regExpProtoFuncExec), DontEnum);
     56    putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, exec->propertyNames().test, regExpProtoFuncTest), DontEnum);
    5757    putDirectFunction(new PrototypeFunction(exec, functionPrototype, 0, exec->propertyNames().toString, regExpProtoFuncToString), DontEnum);
    5858}
     
    123123// ------------------------------ RegExpImp ------------------------------------
    124124
    125 const ClassInfo RegExpImp::info = { "RegExp", 0, &RegExpImpTable };
     125const ClassInfo RegExpImp::info = { "RegExp", 0, 0, ExecState::RegExpImpTable };
    126126
    127127/* Source for regexp_object.lut.h
     
    148148bool RegExpImp::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    149149{
    150   return getStaticValueSlot<RegExpImp, JSObject>(exec, &RegExpImpTable, this, propertyName, slot);
     150  return getStaticValueSlot<RegExpImp, JSObject>(exec, ExecState::RegExpImpTable(exec), this, propertyName, slot);
    151151}
    152152
     
    172172void RegExpImp::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
    173173{
    174     lookupPut<RegExpImp, JSObject>(exec, propertyName, value, &RegExpImpTable, this);
     174    lookupPut<RegExpImp, JSObject>(exec, propertyName, value, ExecState::RegExpImpTable(exec), this);
    175175}
    176176
     
    243243// ------------------------------ RegExpObjectImp ------------------------------
    244244
    245 const ClassInfo RegExpObjectImp::info = { "Function", &InternalFunctionImp::info, &RegExpObjectImpTable };
     245const ClassInfo RegExpObjectImp::info = { "Function", &InternalFunctionImp::info, 0, ExecState::RegExpObjectImpTable };
    246246
    247247/* Source for regexp_object.lut.h
     
    364364bool RegExpObjectImp::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
    365365{
    366   return getStaticValueSlot<RegExpObjectImp, InternalFunctionImp>(exec, &RegExpObjectImpTable, this, propertyName, slot);
     366  return getStaticValueSlot<RegExpObjectImp, InternalFunctionImp>(exec, ExecState::RegExpObjectImpTable(exec), this, propertyName, slot);
    367367}
    368368
     
    409409void RegExpObjectImp::put(ExecState *exec, const Identifier &propertyName, JSValue *value)
    410410{
    411     lookupPut<RegExpObjectImp, InternalFunctionImp>(exec, propertyName, value, &RegExpObjectImpTable, this);
     411    lookupPut<RegExpObjectImp, InternalFunctionImp>(exec, propertyName, value, ExecState::RegExpObjectImpTable(exec), this);
    412412}
    413413
Note: See TracChangeset for help on using the changeset viewer.