Changeset 28884 in webkit for trunk/JavaScriptCore/kjs/JSGlobalObject.cpp
- Timestamp:
- Dec 20, 2007, 1:32:06 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalObject.cpp
r28527 r28884 130 130 } 131 131 132 bool JSGlobalObject::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 133 { 134 if (symbolTableGet(propertyName, slot)) 135 return true; 136 return JSVariableObject::getOwnPropertySlot(exec, propertyName, slot); 137 } 138 139 void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr) 140 { 141 if (symbolTablePut(propertyName, value, attr)) 142 return; 143 return JSVariableObject::put(exec, propertyName, value, attr); 144 } 145 132 146 static inline JSObject* lastInPrototypeChain(JSObject* object) 133 147 { … … 140 154 void JSGlobalObject::reset(JSValue* prototype) 141 155 { 142 // Clear before inititalizing, to avoid marking uninitialized (dangerous) or 143 // stale (wasteful) pointers during possible garbage collection while creating 144 // new objects below. 145 146 ExecState* exec = &d()->globalExec; 156 // Clear before inititalizing, to avoid calling mark() on stale pointers -- 157 // which would be wasteful -- or uninitialized pointers -- which would be 158 // dangerous. (The allocations below may cause a GC.) 159 160 _prop.clear(); 161 localStorage().clear(); 162 symbolTable().clear(); 147 163 148 164 // Prototypes … … 182 198 d()->typeErrorConstructor = 0; 183 199 d()->URIErrorConstructor = 0; 200 201 ExecState* exec = &d()->globalExec; 184 202 185 203 // Prototypes
Note:
See TracChangeset
for help on using the changeset viewer.