Ignore:
Timestamp:
Dec 15, 2008, 4:22:14 PM (16 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-12-15 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

  • fix <rdar://problem/6427048> crash due to infinite recursion after setting window.proto = window

Replaced toGlobalObject with the more generally useful unwrappedObject and used it to
fix the cycle detection code in put(proto).

  • runtime/JSGlobalObject.cpp: Removed toGlobalObject. We now use unwrappedObject instead.
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::isGlobalObject): Ditto.
  • runtime/JSGlobalObjectFunctions.cpp: (JSC::globalFuncEval): Use unwrappedObject and isGlobalObject here rather than toGlobalObject.
  • runtime/JSObject.cpp: (JSC::JSObject::put): Rewrote prototype cycle checking loop. Use unwrappedObject in the loop now. (JSC::JSObject::unwrappedObject): Replaced toGlobalObject with this new function.
  • runtime/JSObject.h: More of the same.

WebCore:

2008-12-15 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

  • fix <rdar://problem/6427048> crash due to infinite recursion after setting window.proto = window

Test: fast/dom/Window/window-custom-prototype.html

Replaced toGlobalObject with the more generally useful unwrappedObject.

  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::unwrappedObject): Added.
  • bindings/js/JSDOMWindowShell.h: Declared unwrappedObject.
  • bindings/js/JSQuarantinedObjectWrapper.h: (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): Ditto.

LayoutTests:

2008-12-15 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

  • test for <rdar://problem/6427048> crash due to infinite recursion after setting window.proto = window
  • fast/canvas/canvas-gradient-without-path.html: Let make-js-test-wrappers update this one.
  • fast/dom/Window/resources/TEMPLATE.html: Copied from LayoutTests/fast/js/resources/TEMPLATE.html.
  • fast/dom/Window/resources/window-custom-prototype.js: Added.
  • fast/dom/Window/window-custom-prototype-expected.txt: Added.
  • fast/dom/Window/window-custom-prototype.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r39142 r39320  
    9797__ZN3JSC10Identifier5equalEPKNS_7UString3RepEPKc
    9898__ZN3JSC10JSFunction4infoE
    99 __ZN3JSC16InternalFunction4nameEPNS_12JSGlobalDataE
    10099__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeE
    101100__ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeEPKc
     
    146145__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEPNS6_INS5_6RefPtrINS_12FuncDeclNodeEEELm0EEERKNS_10SourceCodeEji
    147146__ZN3JSC16InternalFunction4infoE
     147__ZN3JSC16InternalFunction4nameEPNS_12JSGlobalDataE
    148148__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF10PassRefPtrINS_9StructureEEERKNS_10IdentifierE
    149149__ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
     
    161161__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectEPNS_7JSValueERKNS_7ArgListE
    162162__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
     163__ZN3JSC4Heap11objectCountEv
    163164__ZN3JSC4Heap14allocateNumberEm
    164165__ZN3JSC4Heap14primaryHeapEndEv
     
    177178__ZN3JSC4Heap8allocateEm
    178179__ZN3JSC4Heap9unprotectEPNS_7JSValueE
    179 __ZN3JSC4Heap11objectCountEv
    180 __ZNK3JSC4Heap10statisticsEv
    181180__ZN3JSC4callEPNS_9ExecStateEPNS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE
    182181__ZN3JSC5equalEPKNS_7UString3RepES3_
     
    230229__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
    231230__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj
     231__ZN3JSC8JSObject15unwrappedObjectEv
    232232__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
    233233__ZN3JSC8JSObject17createInheritorIDEv
     
    281281__ZN3WTF16fastZeroedMallocEm
    282282__ZN3WTF19initializeThreadingEv
     283__ZN3WTF20fastMallocStatisticsEv
    283284__ZN3WTF21RefCountedLeakCounter16suppressMessagesEPKc
    284285__ZN3WTF21RefCountedLeakCounter24cancelMessageSuppressionEPKc
     
    289290__ZN3WTF23waitForThreadCompletionEjPPv
    290291__ZN3WTF27releaseFastMallocFreeMemoryEv
    291 __ZN3WTF20fastMallocStatisticsEv
    292292__ZN3WTF28setMainThreadCallbacksPausedEb
    293293__ZN3WTF36lockAtomicallyInitializedStaticMutexEv
     
    310310__ZNK3JSC12StringObject8toStringEPNS_9ExecStateE
    311311__ZNK3JSC14JSGlobalObject14isDynamicScopeEv
    312 __ZNK3JSC14JSGlobalObject14toGlobalObjectEPNS_9ExecStateE
    313312__ZNK3JSC16InternalFunction9classInfoEv
    314313__ZNK3JSC16JSVariableObject16isVariableObjectEv
     
    318317__ZNK3JSC17DebuggerCallFrame4typeEv
    319318__ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERPNS_7JSValueE
     319__ZNK3JSC4Heap10statisticsEv
    320320__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
    321321__ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE
     
    344344__ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
    345345__ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE
    346 __ZNK3JSC8JSObject14toGlobalObjectEPNS_9ExecStateE
    347346__ZNK3JSC8JSObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj
    348347__ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE
Note: See TracChangeset for help on using the changeset viewer.