summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSValue.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2010-11-18 17:33:13 -0800
committerRussell Brenner <russellbrenner@google.com>2010-12-02 13:47:21 -0800
commit6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch)
tree103a13998c33944d6ab3b8318c509a037e639460 /JavaScriptCore/runtime/JSValue.cpp
parentbdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff)
downloadexternal_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'JavaScriptCore/runtime/JSValue.cpp')
-rw-r--r--JavaScriptCore/runtime/JSValue.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/JavaScriptCore/runtime/JSValue.cpp b/JavaScriptCore/runtime/JSValue.cpp
index 2a23a79..f4662db 100644
--- a/JavaScriptCore/runtime/JSValue.cpp
+++ b/JavaScriptCore/runtime/JSValue.cpp
@@ -62,10 +62,10 @@ JSObject* JSValue::toObjectSlowCase(ExecState* exec) const
return constructNumber(exec, asValue());
if (isTrue() || isFalse())
return constructBooleanFromImmediateBoolean(exec, asValue());
+
ASSERT(isUndefinedOrNull());
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, isNull());
- throwError(exec, exception);
- return new (exec) JSNotAnObject(exec, exception);
+ throwError(exec, createNotAnObjectError(exec, *this));
+ return new (exec) JSNotAnObject(exec);
}
JSObject* JSValue::toThisObjectSlowCase(ExecState* exec) const
@@ -87,10 +87,10 @@ JSObject* JSValue::synthesizeObject(ExecState* exec) const
return constructNumber(exec, asValue());
if (isBoolean())
return constructBooleanFromImmediateBoolean(exec, asValue());
-
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, isNull());
- throwError(exec, exception);
- return new (exec) JSNotAnObject(exec, exception);
+
+ ASSERT(isUndefinedOrNull());
+ throwError(exec, createNotAnObjectError(exec, *this));
+ return new (exec) JSNotAnObject(exec);
}
JSObject* JSValue::synthesizePrototype(ExecState* exec) const
@@ -101,9 +101,9 @@ JSObject* JSValue::synthesizePrototype(ExecState* exec) const
if (isBoolean())
return exec->lexicalGlobalObject()->booleanPrototype();
- JSNotAnObjectErrorStub* exception = createNotAnObjectErrorStub(exec, isNull());
- throwError(exec, exception);
- return new (exec) JSNotAnObject(exec, exception);
+ ASSERT(isUndefinedOrNull());
+ throwError(exec, createNotAnObjectError(exec, *this));
+ return new (exec) JSNotAnObject(exec);
}
#ifndef NDEBUG