Changeset 19203 in webkit


Ignore:
Timestamp:
Jan 28, 2007 6:30:42 PM (17 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.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r19193 r19203  
     12007-01-28  David Kilzer  <ddkilzer@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=9815
     6          JavaScript TypeError loading Dean Edwards' JS compressor/obfuscator
     7
     8        Creating a function using 'new Function()' was not setting its prototype with the
     9        same flags as 'function() { }'.
     10
     11        Test: fast/js/function-prototype.html
     12
     13        * kjs/function_object.cpp:
     14        (FunctionObjectImp::construct): Change flags from DontEnum|DontDelete|ReadOnly to
     15        Internal|DontDelete to match FuncDeclNode::processFuncDecl() and
     16        FuncExprNode::evaluate() in kjs/nodes.cpp.
     17
    1182007-01-27  Geoffrey Garen  <ggaren@apple.com>
    219
  • 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}
  • trunk/LayoutTests/ChangeLog

    r19199 r19203  
     12007-01-28  David Kilzer  <ddkilzer@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - Test for http://bugs.webkit.org/show_bug.cgi?id=9815
     6          JavaScript TypeError loading Dean Edwards' JS compressor/obfuscator
     7
     8        * fast/js/function-prototype-expected.txt: Added.
     9        * fast/js/function-prototype.html: Added.
     10
    1112007-01-28  Alexey Proskuryakov  <ap@webkit.org>
    212
Note: See TracChangeset for help on using the changeset viewer.