Commit e217b16e authored by oliver@apple.com's avatar oliver@apple.com
Browse files

2011-01-19 Oliver Hunt <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Remove non-spec support for callable RegExp
        https://bugs.webkit.org/show_bug.cgi?id=28285

        Update test results for new behaviour.

        * fast/js/sputnik/Conformance/11_Expressions/11.4_Unary_Operators/11.4.3_The_typeof_Operator/S11.4.3_A3.6-expected.txt:
        * fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A1_T1-expected.txt:
        * fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A1_T2-expected.txt:
        * fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A3_T1-expected.txt:
        * fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A3_T2-expected.txt:
        * fast/loader/stateobjects/pushstate-object-types-expected.txt:
        * fast/regex/cross-frame-callable-expected.txt:
        * fast/regex/script-tests/cross-frame-callable.js:
        (doTest):
2011-01-19  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Remove non-spec support for callable RegExp
        https://bugs.webkit.org/show_bug.cgi?id=28285

        Remove support for callable regexps.  If it breaks sites we can
        just roll this out.

        * runtime/RegExpObject.cpp:
        * runtime/RegExpObject.h:
        * tests/mozilla/expected.html: update results.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b29027e7
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove non-spec support for callable RegExp
https://bugs.webkit.org/show_bug.cgi?id=28285
Update test results for new behaviour.
* fast/js/sputnik/Conformance/11_Expressions/11.4_Unary_Operators/11.4.3_The_typeof_Operator/S11.4.3_A3.6-expected.txt:
* fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A1_T1-expected.txt:
* fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A1_T2-expected.txt:
* fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A3_T1-expected.txt:
* fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.7/S15.10.7_A3_T2-expected.txt:
* fast/loader/stateobjects/pushstate-object-types-expected.txt:
* fast/regex/cross-frame-callable-expected.txt:
* fast/regex/script-tests/cross-frame-callable.js:
(doTest):
2011-01-11 Martin Robinson <mrobinson@igalia.com>
 
Reviewed by Gustavo Noronha Silva.
......
S11.4.3_A3.6
FAIL SputnikError: #11: typeof new RegExp() === "object". Actual: function
PASS
TEST COMPLETE
S15.10.7_A1_T1
FAIL SputnikError: #1.2: /[^a]*/() throw TypeError. Actual: Error: No input to /[^a]*/.
PASS
TEST COMPLETE
S15.10.7_A1_T2
FAIL SputnikError: #1.2: RegExp("a|b","g")() throw TypeError. Actual: Error: No input to /a|b/g.
PASS
TEST COMPLETE
S15.10.7_A3_T1
FAIL SputnikError: #1: __re = /[^a]*/; typeof __re === "object". Actual: function
PASS
TEST COMPLETE
S15.10.7_A3_T2
FAIL SputnikError: #1: __re = new RegExp; typeof __re === "object". Actual: function
PASS
TEST COMPLETE
......@@ -4,7 +4,7 @@ State popped - [object ImageData] (type object)
State popped - [object Object] (type object)
State popped - [object Object] (type object)
State popped - (type object)
State popped - /foo/gi (type function)
State popped - /foo/gi (type object)
State popped - 0 (type object)
State popped - String (type string)
State popped - 42 (type number)
......
PASS re('a') is ['a']
PASS re('a') threw exception TypeError: '/a/' is not a function (evaluating 're('a')').
PASS re.exec('a') is ['a']
PASS successfullyParsed is true
TEST COMPLETE
......
function doTest(childRegExp)
{
re = childRegExp;
shouldBe("re('a')", "['a']");
shouldThrow("re('a')");
shouldBe("re.exec('a')", "['a']");
}
var iframe = document.createElement('iframe');
......
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove non-spec support for callable RegExp
https://bugs.webkit.org/show_bug.cgi?id=28285
Remove support for callable regexps. If it breaks sites we can
just roll this out.
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* tests/mozilla/expected.html: update results.
2011-01-19 Antti Koivisto <antti@apple.com>
 
Reviewed by Oliver Hunt.
......
......@@ -128,17 +128,6 @@ JSValue RegExpObject::exec(ExecState* exec)
return jsNull();
}
static EncodedJSValue JSC_HOST_CALL callRegExpObject(ExecState* exec)
{
return JSValue::encode(asRegExpObject(exec->callee())->exec(exec));
}
CallType RegExpObject::getCallData(CallData& callData)
{
callData.native.function = callRegExpObject;
return CallTypeHost;
}
// Shared implementation used by test and exec.
bool RegExpObject::match(ExecState* exec)
{
......
......@@ -58,8 +58,6 @@ namespace JSC {
private:
bool match(ExecState*);
virtual CallType getCallData(CallData&);
struct RegExpObjectData : FastAllocBase {
RegExpObjectData(NonNullPassRefPtr<RegExp> regExp, double lastIndex)
: regExp(regExp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment