Changeset 96836 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Oct 6, 2011, 11:17:07 AM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r96673 r96836 80 80 ASSERT(Parent::inherits(&s_info)); 81 81 ASSERT(Parent::isGlobalObject()); 82 Base::finishCreation(globalData , this);82 Base::finishCreation(globalData); 83 83 init(static_cast<JSGlobalObject*>(this)->globalExec()); 84 84 } -
trunk/Source/JavaScriptCore/ChangeLog
r96831 r96836 1 2011-10-05 Gavin Barraclough <[email protected]> 2 3 Add explicit JSGlobalThis type. 4 https://bugs.webkit.org/show_bug.cgi?id=69478 5 6 Reviewed by Darin Adler. 7 8 JSC supports a split global object, as used by WebCore for the Window. As a stage 9 of making this visible to JSC, make it so that if the global this value is not the 10 global object itself, it must be a subclass of JSGlobalThis. 11 12 * API/JSCallbackObjectFunctions.h: 13 (JSC::::finishCreation): 14 - Don't pass the thisValue to JSGlobalObject::finishCreation. 15 * JavaScriptCore.xcodeproj/project.pbxproj: 16 - Added JSGlobalThis.h 17 * jsc.cpp: 18 (GlobalObject::finishCreation): 19 - Don't pass the thisValue to JSGlobalObject::finishCreation. 20 * runtime/JSGlobalObject.h: 21 (JSC::JSGlobalObject::create): 22 (JSC::JSGlobalObject::finishCreation): 23 - finishCreation takes a JSGlobalThis, or thisValue is implicit. 24 * runtime/JSGlobalThis.h: Added. 25 (JSC::JSGlobalThis::create): 26 (JSC::JSGlobalThis::JSGlobalThis): 27 (JSC::JSGlobalThis::finishCreation): 28 - Thin wrapper on JSNonFinalObject to allow type checking. 29 * testRegExp.cpp: 30 (GlobalObject::finishCreation): 31 - Don't pass the thisValue to JSGlobalObject::finishCreation. 32 1 33 2011-10-06 Mark Hahnenberg <[email protected]> 2 34 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r96563 r96836 284 284 860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */; }; 285 285 860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */; }; 286 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */ = {isa = PBXBuildFile; fileRef = 8604F503143CE1C100B295F5 /* JSGlobalThis.h */; settings = {ATTRIBUTES = (Private, ); }; }; 286 287 8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8626BECE11928E3900782FAB /* StringStatics.cpp */; }; 287 288 8627E5EC11F1281900A313B5 /* PageAllocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8627E5EA11F1281900A313B5 /* PageAllocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1054 1055 860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerX86Common.h; sourceTree = "<group>"; }; 1055 1056 8604F4F2143A6C4400B295F5 /* ChangeLog */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; 1057 8604F503143CE1C100B295F5 /* JSGlobalThis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalThis.h; sourceTree = "<group>"; }; 1056 1058 8626BECE11928E3900782FAB /* StringStatics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringStatics.cpp; path = text/StringStatics.cpp; sourceTree = "<group>"; }; 1057 1059 8627E5EA11F1281900A313B5 /* PageAllocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageAllocation.h; sourceTree = "<group>"; }; … … 2124 2126 BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */, 2125 2127 BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */, 2128 8604F503143CE1C100B295F5 /* JSGlobalThis.h */, 2126 2129 65EA4C99092AF9E20093D800 /* JSLock.cpp */, 2127 2130 65EA4C9A092AF9E20093D800 /* JSLock.h */, … … 2874 2877 0FE228ED1436AB2700196C48 /* Heuristics.h in Headers */, 2875 2878 0FFF4BB4143955E900655BC0 /* DFGStructureSet.h in Headers */, 2879 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */, 2876 2880 ); 2877 2881 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/JavaScriptCore/jsc.cpp
r96146 r96836 162 162 void finishCreation(JSGlobalData& globalData, const Vector<UString>& arguments) 163 163 { 164 Base::finishCreation(globalData , this);164 Base::finishCreation(globalData); 165 165 166 166 addFunction(globalData, "debug", functionDebug, 1); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r96760 r96836 25 25 #include "JSArray.h" 26 26 #include "JSGlobalData.h" 27 #include "JSGlobalThis.h" 27 28 #include "JSVariableObject.h" 28 29 #include "JSWeakObjectMapRefInternal.h" … … 144 145 { 145 146 JSGlobalObject* globalObject = new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure); 146 globalObject->finishCreation(globalData , globalObject);147 globalObject->finishCreation(globalData); 147 148 return globalObject; 148 149 } … … 160 161 } 161 162 162 void finishCreation(JSGlobalData& globalData, JSObject* thisValue) 163 void finishCreation(JSGlobalData& globalData) 164 { 165 Base::finishCreation(globalData); 166 structure()->setGlobalObject(globalData, this); 167 init(this); 168 } 169 170 void finishCreation(JSGlobalData& globalData, JSGlobalThis* thisValue) 163 171 { 164 172 Base::finishCreation(globalData); -
trunk/Source/JavaScriptCore/testRegExp.cpp
r95901 r96836 125 125 void finishCreation(JSGlobalData& globalData, const Vector<UString>& arguments) 126 126 { 127 Base::finishCreation(globalData , this);127 Base::finishCreation(globalData); 128 128 UNUSED_PARAM(arguments); 129 129 }
Note:
See TracChangeset
for help on using the changeset viewer.