Changeset 207334 in webkit
- Timestamp:
- Oct 14, 2016 3:04:42 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207326 r207334 1 2016-10-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 test262: Failure with RegExp.prototype.compile when pattern is undefined 4 https://bugs.webkit.org/show_bug.cgi?id=163431 5 6 Reviewed by Yusuke Suzuki. 7 8 * test262.yaml: 9 1 10 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 11 -
trunk/JSTests/test262.yaml
r206738 r207334 449 449 cmd: runTest262 :normal, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], [:strict] 450 450 - path: test262/test/annexB/built-ins/RegExp/prototype/compile/pattern-undefined.js 451 cmd: runTest262 : fail, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], []451 cmd: runTest262 :normal, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], [] 452 452 - path: test262/test/annexB/built-ins/RegExp/prototype/compile/pattern-undefined.js 453 cmd: runTest262 : fail, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], [:strict]453 cmd: runTest262 :normal, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], [:strict] 454 454 - path: test262/test/annexB/built-ins/RegExp/prototype/compile/this-not-object.js 455 455 cmd: runTest262 :normal, "NoException", ["../../../../../../harness/assert.js", "../../../../../../harness/sta.js"], [] -
trunk/LayoutTests/ChangeLog
r207333 r207334 1 2016-10-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 test262: Failure with RegExp.prototype.compile when pattern is undefined 4 https://bugs.webkit.org/show_bug.cgi?id=163431 5 6 Reviewed by Yusuke Suzuki. 7 8 * js/regexp-compile-expected.txt: 9 * js/script-tests/regexp-compile.js: 10 1 11 2016-10-14 Antoine Quint <graouts@apple.com> 2 12 -
trunk/LayoutTests/js/regexp-compile-expected.txt
r202770 r207334 18 18 PASS re.toString() is '/c/i' 19 19 PASS re.compile(new RegExp('+')); threw exception SyntaxError: Invalid regular expression: nothing to repeat. 20 PASS re.toString() is '/undefined/' 20 PASS re.toString() is '/(?:)/' 21 PASS re.toString() is '/(?:)/' 22 PASS re.toString() is '/(?:)/' 21 23 PASS re.toString() is '/null/' 22 PASS re.toString() is '/(?:)/'23 24 PASS re.toString() is '/z/' 24 25 PASS re.lastIndex is 0 -
trunk/LayoutTests/js/script-tests/regexp-compile.js
r202770 r207334 32 32 shouldThrow("re.compile(new RegExp('+'));"); 33 33 34 re.compile(); 35 shouldBe("re.toString()", "'/(?:)/'"); 34 36 re.compile(undefined); 35 shouldBe("re.toString()", "'/undefined/'"); 37 shouldBe("re.toString()", "'/(?:)/'"); 38 re.compile(""); 39 shouldBe("re.toString()", "'/(?:)/'"); 36 40 37 41 re.compile(null); 38 42 shouldBe("re.toString()", "'/null/'"); 39 40 re.compile();41 shouldBe("re.toString()", "'/(?:)/'");42 43 43 44 re.compile("z", undefined); -
trunk/Source/JavaScriptCore/ChangeLog
r207326 r207334 1 2016-10-14 Joseph Pecoraro <pecoraro@apple.com> 2 3 test262: Failure with RegExp.prototype.compile when pattern is undefined 4 https://bugs.webkit.org/show_bug.cgi?id=163431 5 6 Reviewed by Yusuke Suzuki. 7 8 If pattern is undefined let P be the empty String. 9 https://tc39.github.io/ecma262/#sec-regexpinitialize 10 11 * runtime/RegExpPrototype.cpp: 12 (JSC::regExpProtoFuncCompile): 13 1 14 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp
r206386 r207334 159 159 regExp = asRegExpObject(arg0)->regExp(); 160 160 } else { 161 String pattern = !exec->argumentCount() ? emptyString() : arg0.toString(exec)->value(exec);161 String pattern = arg0.isUndefined() ? emptyString() : arg0.toString(exec)->value(exec); 162 162 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 163 163
Note: See TracChangeset
for help on using the changeset viewer.