Changeset 196986 in webkit
- Timestamp:
- Feb 23, 2016 11:41:56 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196978 r196986 1 2016-02-23 Mark Lam <mark.lam@apple.com> 2 3 Debug assertion failure while loading http://kangax.github.io/compat-table/es6/. 4 https://bugs.webkit.org/show_bug.cgi?id=154542 5 6 Reviewed by Saam Barati. 7 8 * js/Promise-types-expected.txt: 9 * js/basic-map-expected.txt: 10 * js/basic-set-expected.txt: 11 * js/dom/basic-weakmap-expected.txt: 12 * js/dom/basic-weakset-expected.txt: 13 * js/script-tests/Promise-types.js: 14 * js/typedarray-constructors-expected.txt: 15 - Updated error message string. 16 1 17 2016-02-23 Manuel Rego Casasnovas <rego@igalia.com> 2 18 -
trunk/LayoutTests/js/Promise-types-expected.txt
r191276 r196986 17 17 PASS aPromise.catch.length is 1 18 18 aPromise2 = Promise(...) 19 PASS Promise(function(resolve, reject) { resolve(1); }) threw exception TypeError: Type error.19 PASS Promise(function(resolve, reject) { resolve(1); }) threw exception TypeError: calling Promise constructor without new is invalid. 20 20 21 21 Promise constructor … … 23 23 PASS Promise.length is 1 24 24 PASS new Promise() threw exception TypeError: Promise constructor takes a function argument. 25 PASS Promise() threw exception TypeError: Type error.25 PASS Promise() threw exception TypeError: calling Promise constructor without new is invalid. 26 26 PASS new Promise(1) threw exception TypeError: Promise constructor takes a function argument. 27 27 PASS new Promise('hello') threw exception TypeError: Promise constructor takes a function argument. … … 30 30 PASS new Promise(null) threw exception TypeError: Promise constructor takes a function argument. 31 31 PASS new Promise(undefined) threw exception TypeError: Promise constructor takes a function argument. 32 PASS Promise(1) threw exception TypeError: Type error.33 PASS Promise('hello') threw exception TypeError: Type error.34 PASS Promise([]) threw exception TypeError: Type error.35 PASS Promise({}) threw exception TypeError: Type error.36 PASS Promise(null) threw exception TypeError: Type error.37 PASS Promise(undefined) threw exception TypeError: Type error.32 PASS Promise(1) threw exception TypeError: calling Promise constructor without new is invalid. 33 PASS Promise('hello') threw exception TypeError: calling Promise constructor without new is invalid. 34 PASS Promise([]) threw exception TypeError: calling Promise constructor without new is invalid. 35 PASS Promise({}) threw exception TypeError: calling Promise constructor without new is invalid. 36 PASS Promise(null) threw exception TypeError: calling Promise constructor without new is invalid. 37 PASS Promise(undefined) threw exception TypeError: calling Promise constructor without new is invalid. 38 38 39 39 Promise statics -
trunk/LayoutTests/js/basic-map-expected.txt
r181556 r196986 11 11 PASS new Map(undefined, undefined) instanceof Map is true 12 12 PASS new Map(null, undefined) instanceof Map is true 13 PASS Map() threw exception TypeError: Map cannot be called as a function.14 PASS Map(1) threw exception TypeError: Map cannot be called as a function.15 PASS Map(true) threw exception TypeError: Map cannot be called as a function.16 PASS Map('String') threw exception TypeError: Map cannot be called as a function.17 PASS Map([]) threw exception TypeError: Map cannot be called as a function.18 PASS Map({}) threw exception TypeError: Map cannot be called as a function.19 PASS Map(undefined) threw exception TypeError: Map cannot be called as a function.20 PASS Map(null) threw exception TypeError: Map cannot be called as a function.13 PASS Map() threw exception TypeError: calling Map constructor without new is invalid. 14 PASS Map(1) threw exception TypeError: calling Map constructor without new is invalid. 15 PASS Map(true) threw exception TypeError: calling Map constructor without new is invalid. 16 PASS Map('String') threw exception TypeError: calling Map constructor without new is invalid. 17 PASS Map([]) threw exception TypeError: calling Map constructor without new is invalid. 18 PASS Map({}) threw exception TypeError: calling Map constructor without new is invalid. 19 PASS Map(undefined) threw exception TypeError: calling Map constructor without new is invalid. 20 PASS Map(null) threw exception TypeError: calling Map constructor without new is invalid. 21 21 PASS new Map(1) threw exception TypeError: Type error. 22 22 PASS new Map(true) threw exception TypeError: Type error. -
trunk/LayoutTests/js/basic-set-expected.txt
r181556 r196986 6 6 PASS Set instanceof Set is false 7 7 PASS Set.prototype instanceof Set is false 8 PASS Set() instanceof Set threw exception TypeError: Set cannot be called as a function.8 PASS Set() instanceof Set threw exception TypeError: calling Set constructor without new is invalid. 9 9 PASS new Set() instanceof Set is true 10 PASS Set(null) instanceof Set threw exception TypeError: Set cannot be called as a function.11 PASS Set(undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.12 PASS Set(undefined, undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.13 PASS Set(null, undefined) instanceof Set threw exception TypeError: Set cannot be called as a function.10 PASS Set(null) instanceof Set threw exception TypeError: calling Set constructor without new is invalid. 11 PASS Set(undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid. 12 PASS Set(undefined, undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid. 13 PASS Set(null, undefined) instanceof Set threw exception TypeError: calling Set constructor without new is invalid. 14 14 PASS new Set(null) instanceof Set is true 15 15 PASS new Set(undefined) instanceof Set is true 16 16 PASS new Set(undefined, undefined) instanceof Set is true 17 17 PASS new Set(null, undefined) instanceof Set is true 18 PASS Set(1) threw exception TypeError: Set cannot be called as a function.19 PASS Set(true) threw exception TypeError: Set cannot be called as a function.20 PASS Set([]) threw exception TypeError: Set cannot be called as a function.21 PASS Set({}) threw exception TypeError: Set cannot be called as a function.22 PASS Set(undefined, null) threw exception TypeError: Set cannot be called as a function.23 PASS Set(undefined, {}) threw exception TypeError: Set cannot be called as a function.18 PASS Set(1) threw exception TypeError: calling Set constructor without new is invalid. 19 PASS Set(true) threw exception TypeError: calling Set constructor without new is invalid. 20 PASS Set([]) threw exception TypeError: calling Set constructor without new is invalid. 21 PASS Set({}) threw exception TypeError: calling Set constructor without new is invalid. 22 PASS Set(undefined, null) threw exception TypeError: calling Set constructor without new is invalid. 23 PASS Set(undefined, {}) threw exception TypeError: calling Set constructor without new is invalid. 24 24 PASS new Set(1) threw exception TypeError: Type error. 25 25 PASS new Set(true) threw exception TypeError: Type error. -
trunk/LayoutTests/js/dom/basic-weakmap-expected.txt
r182994 r196986 7 7 PASS WeakMap.prototype instanceof WeakMap is false 8 8 PASS new WeakMap() instanceof WeakMap is true 9 PASS WeakMap() threw exception TypeError: WeakMap cannot be called as a function.9 PASS WeakMap() threw exception TypeError: calling WeakMap constructor without new is invalid. 10 10 PASS map.set(0, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. 11 11 PASS map.set(0.5, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. -
trunk/LayoutTests/js/dom/basic-weakset-expected.txt
r182994 r196986 7 7 PASS WeakSet.prototype instanceof WeakSet is false 8 8 PASS new WeakSet() instanceof WeakSet is true 9 PASS WeakSet() threw exception TypeError: WeakSet cannot be called as a function.9 PASS WeakSet() threw exception TypeError: calling WeakSet constructor without new is invalid. 10 10 PASS set.add(0) threw exception TypeError: Attempted to add a non-object key to a WeakSet. 11 11 PASS set.add(0.5) threw exception TypeError: Attempted to add a non-object key to a WeakSet. -
trunk/LayoutTests/js/script-tests/Promise-types.js
r191276 r196986 42 42 shouldThrow("new Promise(undefined)", "'TypeError: Promise constructor takes a function argument'"); 43 43 44 shouldThrow("Promise(1)", "'TypeError: Type error'");45 shouldThrow("Promise('hello')", "'TypeError: Type error'");46 shouldThrow("Promise([])", "'TypeError: Type error'");47 shouldThrow("Promise({})", "'TypeError: Type error'");48 shouldThrow("Promise(null)", "'TypeError: Type error'");49 shouldThrow("Promise(undefined)", "'TypeError: Type error'");44 shouldThrow("Promise(1)", "'TypeError: calling Promise constructor without new is invalid'"); 45 shouldThrow("Promise('hello')", "'TypeError: calling Promise constructor without new is invalid'"); 46 shouldThrow("Promise([])", "'TypeError: calling Promise constructor without new is invalid'"); 47 shouldThrow("Promise({})", "'TypeError: calling Promise constructor without new is invalid'"); 48 shouldThrow("Promise(null)", "'TypeError: calling Promise constructor without new is invalid'"); 49 shouldThrow("Promise(undefined)", "'TypeError: calling Promise constructor without new is invalid'"); 50 50 51 51 // Promise statics -
trunk/LayoutTests/js/typedarray-constructors-expected.txt
r181889 r196986 4 4 5 5 6 PASS Int8Array() threw exception TypeError: Int8Array is not a function. (In 'Int8Array()', 'Int8Array' is an instance of Function).6 PASS Int8Array() threw exception TypeError: calling Int8Array constructor without new is invalid. 7 7 PASS new Int8Array() did not throw exception. 8 PASS Int16Array() threw exception TypeError: Int16Array is not a function. (In 'Int16Array()', 'Int16Array' is an instance of Function).8 PASS Int16Array() threw exception TypeError: calling Int16Array constructor without new is invalid. 9 9 PASS new Int16Array() did not throw exception. 10 PASS Int32Array() threw exception TypeError: Int32Array is not a function. (In 'Int32Array()', 'Int32Array' is an instance of Function).10 PASS Int32Array() threw exception TypeError: calling Int32Array constructor without new is invalid. 11 11 PASS new Int32Array() did not throw exception. 12 PASS Uint8Array() threw exception TypeError: Uint8Array is not a function. (In 'Uint8Array()', 'Uint8Array' is an instance of Function).12 PASS Uint8Array() threw exception TypeError: calling Uint8Array constructor without new is invalid. 13 13 PASS new Uint8Array() did not throw exception. 14 PASS Uint16Array() threw exception TypeError: Uint16Array is not a function. (In 'Uint16Array()', 'Uint16Array' is an instance of Function).14 PASS Uint16Array() threw exception TypeError: calling Uint16Array constructor without new is invalid. 15 15 PASS new Uint16Array() did not throw exception. 16 PASS Uint32Array() threw exception TypeError: Uint32Array is not a function. (In 'Uint32Array()', 'Uint32Array' is an instance of Function).16 PASS Uint32Array() threw exception TypeError: calling Uint32Array constructor without new is invalid. 17 17 PASS new Uint32Array() did not throw exception. 18 PASS Uint8ClampedArray() threw exception TypeError: Uint8ClampedArray is not a function. (In 'Uint8ClampedArray()', 'Uint8ClampedArray' is an instance of Function).18 PASS Uint8ClampedArray() threw exception TypeError: calling Uint8ClampedArray constructor without new is invalid. 19 19 PASS new Uint8ClampedArray() did not throw exception. 20 PASS Float32Array() threw exception TypeError: Float32Array is not a function. (In 'Float32Array()', 'Float32Array' is an instance of Function).20 PASS Float32Array() threw exception TypeError: calling Float32Array constructor without new is invalid. 21 21 PASS new Float32Array() did not throw exception. 22 PASS Float64Array() threw exception TypeError: Float64Array is not a function. (In 'Float64Array()', 'Float64Array' is an instance of Function).22 PASS Float64Array() threw exception TypeError: calling Float64Array constructor without new is invalid. 23 23 PASS new Float64Array() did not throw exception. 24 PASS DataView(new ArrayBuffer()) threw exception TypeError: DataView is not a function. (In 'DataView(new ArrayBuffer())', 'DataView' is an instance of Function).24 PASS DataView(new ArrayBuffer()) threw exception TypeError: calling DataView constructor without new is invalid. 25 25 PASS new DataView(new ArrayBuffer()) did not throw exception. 26 26 PASS successfullyParsed is true -
trunk/Source/JavaScriptCore/ChangeLog
r196985 r196986 1 2016-02-23 Mark Lam <mark.lam@apple.com> 2 3 Debug assertion failure while loading http://kangax.github.io/compat-table/es6/. 4 https://bugs.webkit.org/show_bug.cgi?id=154542 5 6 Reviewed by Saam Barati. 7 8 According to the spec, the constructors of the following types "are not intended 9 to be called as a function and will throw an exception". These types are: 10 TypedArrays - https://tc39.github.io/ecma262/#sec-typedarray-constructors 11 Map - https://tc39.github.io/ecma262/#sec-map-constructor 12 Set - https://tc39.github.io/ecma262/#sec-set-constructor 13 WeakMap - https://tc39.github.io/ecma262/#sec-weakmap-constructor 14 WeakSet - https://tc39.github.io/ecma262/#sec-weakset-constructor 15 ArrayBuffer - https://tc39.github.io/ecma262/#sec-arraybuffer-constructor 16 DataView - https://tc39.github.io/ecma262/#sec-dataview-constructor 17 Promise - https://tc39.github.io/ecma262/#sec-promise-constructor 18 Proxy - https://tc39.github.io/ecma262/#sec-proxy-constructor 19 20 This patch does the foillowing: 21 1. Ensures that these constructors can be called but will throw a TypeError 22 when called. 23 2. Makes all these objects use throwConstructorCannotBeCalledAsFunctionTypeError() 24 in their implementation to be consistent. 25 3. Change the error message to "calling XXX constructor without new is invalid". 26 This is clearer because the error is likely due to the user forgetting to use 27 the new operator on these constructors. 28 29 * runtime/Error.h: 30 * runtime/Error.cpp: 31 (JSC::throwConstructorCannotBeCalledAsFunctionTypeError): 32 - Added a convenience function to throw the TypeError. 33 34 * runtime/JSArrayBufferConstructor.cpp: 35 (JSC::constructArrayBuffer): 36 (JSC::callArrayBuffer): 37 (JSC::JSArrayBufferConstructor::getCallData): 38 * runtime/JSGenericTypedArrayViewConstructorInlines.h: 39 (JSC::callGenericTypedArrayView): 40 (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::getCallData): 41 * runtime/JSPromiseConstructor.cpp: 42 (JSC::callPromise): 43 * runtime/MapConstructor.cpp: 44 (JSC::callMap): 45 * runtime/ProxyConstructor.cpp: 46 (JSC::callProxy): 47 (JSC::ProxyConstructor::getCallData): 48 * runtime/SetConstructor.cpp: 49 (JSC::callSet): 50 * runtime/WeakMapConstructor.cpp: 51 (JSC::callWeakMap): 52 * runtime/WeakSetConstructor.cpp: 53 (JSC::callWeakSet): 54 55 * tests/es6.yaml: 56 - The typed_arrays_%TypedArray%[Symbol.species].js test now passes. 57 58 * tests/stress/call-non-calleable-constructors-as-function.js: Added. 59 (test): 60 61 * tests/stress/map-constructor.js: 62 (testCallTypeError): 63 * tests/stress/promise-cannot-be-called.js: 64 (shouldThrow): 65 * tests/stress/proxy-basic.js: 66 * tests/stress/set-constructor.js: 67 * tests/stress/throw-from-ftl-call-ic-slow-path-cells.js: 68 (i.catch): 69 * tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js: 70 (i.catch): 71 * tests/stress/throw-from-ftl-call-ic-slow-path.js: 72 (i.catch): 73 * tests/stress/weak-map-constructor.js: 74 (testCallTypeError): 75 * tests/stress/weak-set-constructor.js: 76 - Updated error message string. 77 1 78 2016-02-23 Alexey Proskuryakov <ap@apple.com> 2 79 -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r189339 r196986 210 210 } 211 211 212 JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState* exec, const char* constructorName) 213 { 214 return exec->vm().throwException(exec, createTypeError(exec, makeString("calling ", constructorName, " constructor without new is invalid"))); 215 } 216 212 217 JSObject* throwTypeError(ExecState* exec) 213 218 { -
trunk/Source/JavaScriptCore/runtime/Error.h
r189339 r196986 73 73 74 74 // Convenience wrappers, create an throw an exception with a default message. 75 JS_EXPORT_PRIVATE JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState*, const char* constructorName); 75 76 JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*); 76 77 JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*); -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
r196966 r196986 105 105 } 106 106 107 static EncodedJSValue JSC_HOST_CALL callArrayBuffer(ExecState* exec) 108 { 109 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "ArrayBuffer")); 110 } 111 107 112 ConstructType JSArrayBufferConstructor::getConstructData( 108 113 JSCell*, ConstructData& constructData) … … 114 119 CallType JSArrayBufferConstructor::getCallData(JSCell*, CallData& callData) 115 120 { 116 callData.native.function = c onstructArrayBuffer;121 callData.native.function = callArrayBuffer; 117 122 return CallTypeHost; 118 123 } -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h
r196966 r196986 259 259 260 260 template<typename ViewClass> 261 static EncodedJSValue JSC_HOST_CALL callGenericTypedArrayView(ExecState* exec) 262 { 263 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, ViewClass::info()->className)); 264 } 265 266 template<typename ViewClass> 261 267 CallType JSGenericTypedArrayViewConstructor<ViewClass>::getCallData(JSCell*, CallData& callData) 262 268 { 263 callData.native.function = c onstructGenericTypedArrayView<ViewClass>;264 return CallType None;269 callData.native.function = callGenericTypedArrayView<ViewClass>; 270 return CallTypeHost; 265 271 } 266 272 -
trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
r196966 r196986 115 115 static EncodedJSValue JSC_HOST_CALL callPromise(ExecState* exec) 116 116 { 117 return throwVMTypeError(exec);117 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "Promise")); 118 118 } 119 119 -
trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp
r196966 r196986 51 51 static EncodedJSValue JSC_HOST_CALL callMap(ExecState* exec) 52 52 { 53 return JSValue::encode(throw TypeError(exec, ASCIILiteral("Map cannot be called as a function")));53 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "Map")); 54 54 } 55 55 -
trunk/Source/JavaScriptCore/runtime/ProxyConstructor.cpp
r196722 r196986 76 76 } 77 77 78 static EncodedJSValue JSC_HOST_CALL callProxy(ExecState* exec) 79 { 80 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "Proxy")); 81 } 82 78 83 CallType ProxyConstructor::getCallData(JSCell*, CallData& callData) 79 84 { 80 // Proxy should throw a TypeError when called as a function. 81 callData.js.functionExecutable = 0; 82 callData.js.scope = 0; 83 callData.native.function = 0; 84 return CallTypeNone; 85 callData.native.function = callProxy; 86 return CallTypeHost; 85 87 } 86 88 -
trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp
r196966 r196986 52 52 static EncodedJSValue JSC_HOST_CALL callSet(ExecState* exec) 53 53 { 54 return JSValue::encode(throw TypeError(exec, ASCIILiteral("Set cannot be called as a function")));54 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "Set")); 55 55 } 56 56 -
trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp
r196966 r196986 49 49 static EncodedJSValue JSC_HOST_CALL callWeakMap(ExecState* exec) 50 50 { 51 return JSValue::encode(throw TypeError(exec, ASCIILiteral("WeakMap cannot be called as a function")));51 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "WeakMap")); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp
r196966 r196986 49 49 static EncodedJSValue JSC_HOST_CALL callWeakSet(ExecState* exec) 50 50 { 51 return JSValue::encode(throw TypeError(exec, ASCIILiteral("WeakSet cannot be called as a function")));51 return JSValue::encode(throwConstructorCannotBeCalledAsFunctionTypeError(exec, "WeakSet")); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/tests/es6.yaml
r196956 r196986 1176 1176 cmd: runES6 :normal 1177 1177 - path: es6/typed_arrays_%TypedArray%[Symbol.species].js 1178 cmd: runES6 : fail1178 cmd: runES6 :normal 1179 1179 - path: es6/typed_arrays_ArrayBuffer[Symbol.species].js 1180 1180 cmd: runES6 :normal -
trunk/Source/JavaScriptCore/tests/stress/map-constructor.js
r181333 r196986 13 13 if (!error) 14 14 throw "Error: error not thrown"; 15 if (String(error) !== "TypeError: Map cannot be called as a function")15 if (String(error) !== "TypeError: calling Map constructor without new is invalid") 16 16 throw "Error: bad error " + String(error); 17 17 } -
trunk/Source/JavaScriptCore/tests/stress/promise-cannot-be-called.js
r191276 r196986 22 22 shouldThrow(() => { 23 23 Promise(function (resolve, reject) { executorCalled = true; }); 24 }, `TypeError: Type error`);24 }, `TypeError: calling Promise constructor without new is invalid`); 25 25 shouldBe(executorCalled, false); 26 26 -
trunk/Source/JavaScriptCore/tests/stress/proxy-basic.js
r196789 r196986 73 73 } catch(e) { 74 74 threw = true; 75 assert(e.toString() === "TypeError: Proxy is not a function. (In 'Proxy({}, {})', 'Proxy' is an instance of Function)");75 assert(e.toString() === "TypeError: calling Proxy constructor without new is invalid"); 76 76 } 77 77 assert(threw === true); -
trunk/Source/JavaScriptCore/tests/stress/set-constructor.js
r181333 r196986 13 13 if (!error) 14 14 throw "Error: error not thrown"; 15 if (String(error) !== "TypeError: Set cannot be called as a function")15 if (String(error) !== "TypeError: calling Set constructor without new is invalid") 16 16 throw "Error: bad error " + String(error); 17 17 } -
trunk/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-cells.js
r180234 r196986 173 173 ftlFunction(array, Int8Array); 174 174 } catch (e) { 175 if (e.message.indexOf(" not a function") < 0)175 if (e.message.indexOf("constructor without new is invalid") < 0) 176 176 throw "Error: bad exception message: " + e.message; 177 177 var result = notACell.f; -
trunk/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path-undefined.js
r180234 r196986 173 173 ftlFunction(array, Int8Array); 174 174 } catch (e) { 175 if (e.message.indexOf(" not a function") < 0)175 if (e.message.indexOf("constructor without new is invalid") < 0) 176 176 throw "Error: bad exception message: " + e.message; 177 177 var result = notACell.f; -
trunk/Source/JavaScriptCore/tests/stress/throw-from-ftl-call-ic-slow-path.js
r180234 r196986 173 173 ftlFunction(array, Int8Array); 174 174 } catch (e) { 175 if (e.message.indexOf(" not a function") < 0)175 if (e.message.indexOf("constructor without new is invalid") < 0) 176 176 throw "Error: bad exception message: " + e.message; 177 177 var result = notACell.f; -
trunk/Source/JavaScriptCore/tests/stress/weak-map-constructor.js
r181333 r196986 13 13 if (!error) 14 14 throw "Error: error not thrown"; 15 if (String(error) !== "TypeError: WeakMap cannot be called as a function")15 if (String(error) !== "TypeError: calling WeakMap constructor without new is invalid") 16 16 throw "Error: bad error " + String(error); 17 17 } -
trunk/Source/JavaScriptCore/tests/stress/weak-set-constructor.js
r182994 r196986 13 13 if (!error) 14 14 throw new Error("error not thrown"); 15 if (String(error) !== "TypeError: WeakSet cannot be called as a function")15 if (String(error) !== "TypeError: calling WeakSet constructor without new is invalid") 16 16 throw new Error("bad error " + String(error)); 17 17 }
Note: See TracChangeset
for help on using the changeset viewer.