Summary: | [V8] Avoid using JavaScript objects as context data | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Søren Gjesse <sgjesse> | ||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, commit-queue, dglazkov, pfeldman, sgjesse, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Søren Gjesse
2009-11-25 07:35:58 PST
Created attachment 43847 [details]
Use string instead if JavaScript object for context "data"
This should not be committed before http://codereview.chromium.org/443002 has been committed in Chromium. Comment on attachment 43847 [details] Use string instead if JavaScript object for context "data" > -const char* V8Proxy::kContextDebugDataType = "type"; > -const char* V8Proxy::kContextDebugDataValue = "value"; Remove these from .h as well? Otherwise r+. Looks good to me. (In reply to comment #1) > Created an attachment (id=43847) [details] > Use string instead if JavaScript object for context "data" Created attachment 43900 [details]
Updated patch
Removed unused members from V8Proxy.h
(In reply to comment #3) > (From update of attachment 43847 [details]) > > -const char* V8Proxy::kContextDebugDataType = "type"; > > -const char* V8Proxy::kContextDebugDataValue = "value"; > > Remove these from .h as well? Otherwise r+. Done. Comment on attachment 43900 [details] Updated patch Clearing flags on attachment: 43900 Committed r51407: <http://trac.webkit.org/changeset/51407> All reviewed patches have been landed. Closing bug. This change has a flaw in logic. It removes the ability to set debug context id for a newly created context. The early return: if (debugId == -1) return false; causes V8Proxy::setInjectedScriptContext to always return false for newly created worlds with id > 0. I'll fix. |