Changeset 15474 in webkit for trunk/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- Jul 16, 2006, 7:00:40 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.cpp
r15469 r15474 149 149 150 150 JSValue* jsValue = jsObject->get(exec, Identifier(nameRep)); 151 if (jsValue->isUndefined())152 jsValue = 0;153 151 if (exec->hadException()) { 154 152 if (exception) … … 175 173 } 176 174 177 JSValueRef JSObjectGetPropertyAtIndex(JSContextRef context, JSObjectRef object, unsigned propertyIndex )175 JSValueRef JSObjectGetPropertyAtIndex(JSContextRef context, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception) 178 176 { 179 177 JSLock lock; … … 182 180 183 181 JSValue* jsValue = jsObject->get(exec, propertyIndex); 184 if (jsValue->isUndefined()) 185 return 0; 182 if (exec->hadException()) { 183 if (exception) 184 *exception = toRef(exec->exception()); 185 exec->clearException(); 186 } 186 187 return toRef(jsValue); 187 188 } 188 189 189 190 190 void JSObjectSetPropertyAtIndex(JSContextRef context, JSObjectRef object, unsigned propertyIndex, JSValueRef value )191 void JSObjectSetPropertyAtIndex(JSContextRef context, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception) 191 192 { 192 193 JSLock lock; … … 196 197 197 198 jsObject->put(exec, propertyIndex, jsValue); 199 if (exec->hadException()) { 200 if (exception) 201 *exception = toRef(exec->exception()); 202 exec->clearException(); 203 } 198 204 } 199 205
Note:
See TracChangeset
for help on using the changeset viewer.