Changeset 19203 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Jan 28, 2007, 6:30:42 PM (18 years ago)
Author:
ddkilzer
Message:

JavaScriptCore:

Reviewed by Darin.

Creating a function using 'new Function()' was not setting its prototype with the
same flags as 'function() { }'.

Test: fast/js/function-prototype.html

  • kjs/function_object.cpp: (FunctionObjectImp::construct): Change flags from DontEnum|DontDelete|ReadOnly to Internal|DontDelete to match FuncDeclNode::processFuncDecl() and FuncExprNode::evaluate() in kjs/nodes.cpp.

LayoutTests:

Reviewed by Darin.

  • fast/js/function-prototype-expected.txt: Added.
  • fast/js/function-prototype.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function_object.cpp

    r17372 r19203  
    246246  JSObject *prototype = objCons->construct(exec,List::empty());
    247247  prototype->put(exec, constructorPropertyName, fimp, DontEnum|DontDelete|ReadOnly);
    248   fimp->put(exec, prototypePropertyName, prototype, DontEnum|DontDelete|ReadOnly);
     248  fimp->put(exec, prototypePropertyName, prototype, Internal|DontDelete);
    249249  return fimp;
    250250}
Note: See TracChangeset for help on using the changeset viewer.