Commit 31ca2376 authored by barraclough@apple.com's avatar barraclough@apple.com

Function.prototype.bind.length shoudl be 1.

Rubber stamped by Olier Hunt.

Source/JavaScriptCore: 

* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):

LayoutTests: 

* fast/js/function-bind-expected.txt:
* fast/js/script-tests/function-bind.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8f85803f
2011-09-22 Gavin Barraclough <barraclough@apple.com>
Function.prototype.bind.length shoudl be 1.
Rubber stamped by Olier Hunt.
* fast/js/function-bind-expected.txt:
* fast/js/script-tests/function-bind.js:
2011-09-22 Csaba Osztrogonác <ossy@webkit.org>
[Qt][Mac]Unreviewed gardening.
......@@ -27,6 +27,7 @@ PASS new abcAt(1) threw exception TypeError: 'function charAt() {
[native code]
}' is not a constructor (evaluating 'new abcAt(1)').
FAIL boundFunctionPrototypeAccessed should be false. Was true.
PASS Function.bind.length is 1
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -58,4 +58,6 @@ Object.defineProperty(P, 'prototype', { get:function(){ boundFunctionPrototypeAc
f instanceof P;
shouldBeFalse('boundFunctionPrototypeAccessed');
shouldBe('Function.bind.length', '1');
var successfullyParsed = true;
2011-09-22 Gavin Barraclough <barraclough@apple.com>
Function.prototype.bind.length shoudl be 1.
Rubber stamped by Olier Hunt.
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
2011-09-22 Filip Pizlo <fpizlo@apple.com>
PPC build fix.
......@@ -61,7 +61,7 @@ void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* g
*callFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().call, functionProtoFuncCall);
putDirectWithoutTransition(exec->globalData(), exec->propertyNames().call, *callFunction, DontEnum);
JSFunction* bindFunction = JSFunction::create(exec, globalObject, 0, exec->propertyNames().bind, functionProtoFuncBind);
JSFunction* bindFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().bind, functionProtoFuncBind);
putDirectWithoutTransition(exec->globalData(), exec->propertyNames().bind, bindFunction, DontEnum);
}
......
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