diff options
| author | Leon Clarke <leonclarke@google.com> | 2010-01-27 15:57:47 +0000 |
|---|---|---|
| committer | Leon Clarke <leonclarke@google.com> | 2010-01-27 15:57:47 +0000 |
| commit | 888f6729be6a6f6fbe246cb5a9f122e2dbe455b7 (patch) | |
| tree | 16f9ce250ef5d36e49a0fb0018e979002ed5b4fb /src/runtime.js | |
| parent | 1471e9f5b6f291eea8447f441527cd2a85074a33 (diff) | |
| download | android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.gz android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.bz2 android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.zip | |
Pull from svn bleeding_edge@3716
Diffstat (limited to 'src/runtime.js')
| -rw-r--r-- | src/runtime.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js index ce2f197f..c4c855eb 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -541,7 +541,9 @@ function ToObject(x) { if (IS_STRING(x)) return new $String(x); if (IS_NUMBER(x)) return new $Number(x); if (IS_BOOLEAN(x)) return new $Boolean(x); - if (x == null) throw %MakeTypeError('null_to_object', []); + if (IS_NULL_OR_UNDEFINED(x) && !IS_UNDETECTABLE(x)) { + throw %MakeTypeError('null_to_object', []); + } return x; } |
