delete foo.prop should not walk the property chain to find prop

RESOLVED FIXED

Status

Rhino
Core
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Marc, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13
Build Identifier: 

Statement
delete foo.prop 
should delete property defined in foo (if any) but not in anywhere in foo's prototype chain.

See Ecma 262, 8.6.2.5

Reproducible: Always
(Reporter)

Comment 1

9 years ago
Created attachment 394500 [details] [diff] [review]
Patch with unit test and fix

Comment 2

9 years ago
Indeed; thanks for the patch, I've reviewed it and committed it to CVS HEAD:

***
cvs add -kkv "/Rhino/testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java"
    cvs add: scheduling file `testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java' for addition
    cvs add: use 'cvs commit' to add this file permanently
ok (took 0:00.991)
***

***
cvs ci -m "Fix for Bug 510504 "delete foo.prop should not walk the property chain to find prop"" -l "/Rhino/testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java" "/Rhino/src/org/mozilla/javascript/ScriptRuntime.java"
    RCS file: /cvsroot/mozilla/js/rhino/testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java,v
    done
    Checking in testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java;
    /cvsroot/mozilla/js/rhino/testsrc/org/mozilla/javascript/tests/DeletePropertyTest.java,v  <--  DeletePropertyTest.java
    initial revision: 1.1
    done
    Checking in src/org/mozilla/javascript/ScriptRuntime.java;
    /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java,v  <--  ScriptRuntime.java
    new revision: 1.318; previous revision: 1.317
    done
ok (took 0:24.309)
***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.