Bug 27359 - [V8] Centralize hidden property names
Summary: [V8] Centralize hidden property names
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-16 18:46 PDT by Adam Barth
Modified: 2009-07-16 21:29 PDT (History)
1 user (show)

See Also:


Attachments
patch (10.12 KB, patch)
2009-07-16 18:47 PDT, Adam Barth
levin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-07-16 18:46:14 PDT
We should centralize our repository of hidden property names so we don't step on each others toes in the bindings layer.  Patch forth coming.
Comment 1 Adam Barth 2009-07-16 18:47:55 PDT
Created attachment 32910 [details]
patch
Comment 2 David Levin 2009-07-16 19:07:46 PDT
Comment on attachment 32910 [details]
patch

> Index: WebCore/bindings/v8/V8HiddenPropertyName.cpp
> +    static v8::Persistent<v8::String>* string = new v8::Persistent<v8::String>(v8::Persistent<v8::String>::New(v8::String::NewSymbol(key)));

It seems a shame to repeat "new v8::Persistent<v8::String>(v8::Persistent<v8::String>::New(v8::String::NewSymbol(key)))" twice already in this file.

What about a function so this line of code would look something like this 
   static v8::Persistent<v8::String>* string = createV8PeristentString(key)
?
Comment 3 Adam Barth 2009-07-16 21:18:07 PDT
Will land with modifications.
Comment 4 Adam Barth 2009-07-16 21:29:12 PDT
http://trac.webkit.org/changeset/46005