Bug 104220

Summary: [V8] Implement v8IntegerWithoutIsolate(int i)
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Kentaro Hara
Reported 2012-12-05 22:34:36 PST
To make an Isolate mandatory in v8Integer(), we implement v8IntegerWithoutIsolate(int i) for call sites that don't have an Isolate. Eventually we want to kill v8IntegerWithoutIsolate(int i).
Attachments
Patch (16.17 KB, patch)
2012-12-05 22:42 PST, Kentaro Hara
no flags
Patch (15.12 KB, patch)
2012-12-06 00:05 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-12-05 22:42:52 PST
Kentaro Hara
Comment 2 2012-12-06 00:05:18 PST
Adam Barth
Comment 3 2012-12-06 00:31:52 PST
Comment on attachment 177956 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177956&action=review You might also consider the name deprecatedV8Integer to inform people writing future patches that they shouldn't add more callers of this function. > Source/WebCore/bindings/v8/Dictionary.cpp:300 > - v8::Local<v8::Value> indexedValue = v8Array->Get(v8Integer(i)); > + v8::Local<v8::Value> indexedValue = v8Array->Get(v8IntegerWithoutIsolate(i)); We should be able to store the isolate in a member variable of Dictionary. Code isn't allowed to hold on to Dictionaries past the call frame in which they receive them.
Kentaro Hara
Comment 4 2012-12-06 00:34:13 PST
(In reply to comment #3) > (From update of attachment 177956 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=177956&action=review > > You might also consider the name deprecatedV8Integer to inform people writing future patches that they shouldn't add more callers of this function. Good idea. Will fix before landing. > > Source/WebCore/bindings/v8/Dictionary.cpp:300 > > - v8::Local<v8::Value> indexedValue = v8Array->Get(v8Integer(i)); > > + v8::Local<v8::Value> indexedValue = v8Array->Get(v8IntegerWithoutIsolate(i)); > > We should be able to store the isolate in a member variable of Dictionary. Oops, Dictionary already holds m_isolate. I can use it here. Will fix it.
Kentaro Hara
Comment 5 2012-12-06 00:58:42 PST
Note You need to log in before you can comment on or make changes to this bug.