Bug 61014 - Most built-in properties are not deletable
Summary: Most built-in properties are not deletable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 66473 (view as bug list)
Depends on:
Blocks: 66473
  Show dependency treegraph
 
Reported: 2011-05-17 18:50 PDT by Geoffrey Garen
Modified: 2012-03-13 12:36 PDT (History)
8 users (show)

See Also:


Attachments
The patch (60.13 KB, patch)
2011-10-14 15:48 PDT, Gavin Barraclough
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2011-05-17 18:50:31 PDT
Our static hash tables don't allow for deleting properties. This is the cause of a bunch of expected failures in LayoutTests/sputnik.

For example:

delete Date.UTC // true
Date.UTC // function UTC() { [native code] }
Comment 1 Alexey Proskuryakov 2011-05-18 10:51:18 PDT
See also: bug 55034 (global object's Math property should be deletable)
Comment 2 Gavin Barraclough 2011-10-14 15:48:22 PDT
Created attachment 111100 [details]
The patch
Comment 3 WebKit Review Bot 2011-10-14 15:50:47 PDT
Attachment 111100 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1

Source/JavaScriptCore/runtime/JSObject.h:77:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/runtime/JSObject.h:77:  The parameter name "entry" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/runtime/JSObject.h:77:  The parameter name "slot" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/runtime/JSObject.h:214:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 4 in 65 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Filip Pizlo 2011-10-14 16:01:03 PDT
Comment on attachment 111100 [details]
The patch

View in context: https://bugs.webkit.org/attachment.cgi?id=111100&action=review

> Source/JavaScriptCore/runtime/JSObject.h:214
> +        void reifyStaticFunctions(ExecState* exec);

Rename to reifyStaticFunctionsForDelete().

> Source/JavaScriptCore/runtime/Structure.h:296
> +        // 7 free bits

Maybe delete this comment?  It's probably wrong and unlikely to be useful.
Comment 5 Gavin Barraclough 2011-10-14 18:26:30 PDT
The problem for static functions is fixed in r97536.

A couple of custom getters might still have an issue, we should look into this.
Comment 6 Gavin Barraclough 2011-10-14 18:27:13 PDT
Comment on attachment 111100 [details]
The patch

clearing review flag on landed patch.
Comment 7 Ryosuke Niwa 2011-10-14 22:46:38 PDT
It seems like this patch broke Windows build:
http://build.webkit.org/builders/Windows%20Debug%20%28Build%29/builds/40962/steps/compile-webkit/logs/stdio
Comment 8 Erik Corry 2011-10-17 00:36:50 PDT
This looks like a dupe of https://bugs.webkit.org/show_bug.cgi?id=25527
Comment 9 Adam Roben (:aroben) 2011-10-17 05:58:05 PDT
Attempted to fix the Windows build in http://trac.webkit.org/changeset/97610
Comment 10 Adam Roben (:aroben) 2011-10-17 06:41:21 PDT
…and r97615
Comment 11 Adam Roben (:aroben) 2011-10-17 07:20:20 PDT
…and r97620
Comment 12 Mark S. Miller 2011-10-17 08:17:39 PDT
At https://bugs.webkit.org/show_bug.cgi?id=70207#c2 Gavin confirms this issue is related to that one.
Comment 13 Gavin Barraclough 2012-03-12 19:20:13 PDT
No sure why I didn't close this; not aware of any other specific issues, if any other properties that should be deletable are not, that should warrant separate bug reports.  Fixed in r97536.
Comment 14 Gavin Barraclough 2012-03-13 12:36:16 PDT
*** Bug 66473 has been marked as a duplicate of this bug. ***