Changeset 103697 in webkit for trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
- Timestamp:
- Dec 26, 2011, 8:56:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r102545 r103697 98 98 } 99 99 100 inline bool JSActivation::symbolTablePut(JSGlobalData& globalData, const Identifier& propertyName, JSValue value) 101 { 100 inline bool JSActivation::symbolTablePut(ExecState* exec, const Identifier& propertyName, JSValue value, bool shouldThrow) 101 { 102 JSGlobalData& globalData = exec->globalData(); 102 103 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); 103 104 … … 105 106 if (entry.isNull()) 106 107 return false; 107 if (entry.isReadOnly()) 108 return true; 108 if (entry.isReadOnly()) { 109 if (shouldThrow) 110 throwTypeError(exec, StrictModeReadonlyPropertyWriteError); 111 return true; 112 } 109 113 if (entry.getIndex() >= m_numCapturedVars) 110 114 return false; … … 174 178 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(thisObject)); 175 179 176 if (thisObject->symbolTablePut(exec ->globalData(), propertyName, value))180 if (thisObject->symbolTablePut(exec, propertyName, value, slot.isStrictMode())) 177 181 return; 178 182
Note:
See TracChangeset
for help on using the changeset viewer.