Changeset 35775 in webkit for trunk/JavaScriptCore/API/JSValueRef.cpp
- Timestamp:
- Aug 15, 2008, 12:43:48 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSValueRef.cpp
r35478 r35775 189 189 exec->globalData().heap->registerThread(); 190 190 191 UString::Rep* rep = toJS(string); 192 return toRef(jsString(exec, UString(rep))); 191 return toRef(jsString(exec, string->ustring())); 193 192 } 194 193 … … 224 223 JSValue* jsValue = toJS(value); 225 224 226 JSStringRef stringRef = toRef(jsValue->toString(exec).rep()->ref());227 if (exec->hadException()) { 228 if (exception) 229 *exception = toRef(exec->exception()); 230 exec->clearException(); 231 stringRef = 0;232 } 233 return stringRef ;225 RefPtr<OpaqueJSString> stringRef(OpaqueJSString::create(jsValue->toString(exec))); 226 if (exec->hadException()) { 227 if (exception) 228 *exception = toRef(exec->exception()); 229 exec->clearException(); 230 stringRef.clear(); 231 } 232 return stringRef.release().releaseRef(); 234 233 } 235 234
Note:
See TracChangeset
for help on using the changeset viewer.