Bug 87689

Summary: [V8] Avoid passing NULL to an 'isolate' parameter
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 84074    
Attachments:
Description Flags
Patch
none
patch for landing
none
patch for landing none

Kentaro Hara
Reported 2012-05-28 19:32:02 PDT
v8::Null(isolate) crashes if we pass a NULL isolate. Thus we are planning to replace v8::Null()s in a following way: - Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check. If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise, v8Null(isolate) calls v8::Null(isolate). - In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } ) - In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } ) However, currently we cannot do the replacement mechanically, since some code pass NULL to a non-optional 'isolate' parameter. In other words, currently "non-optional" does not guarantee that 'isolate' is not NULL. In this bug, we remove all the code that passes NULL to a non-optional 'isolate' parameter. This will enable us to achieve the replacement mechanically.
Attachments
Patch (10.95 KB, patch)
2012-05-28 19:39 PDT, Kentaro Hara
no flags
patch for landing (10.02 KB, patch)
2012-05-28 19:52 PDT, Kentaro Hara
no flags
patch for landing (10.02 KB, patch)
2012-05-28 19:53 PDT, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-05-28 19:39:13 PDT
Kentaro Hara
Comment 2 2012-05-28 19:52:26 PDT
Created attachment 144429 [details] patch for landing
Kentaro Hara
Comment 3 2012-05-28 19:53:12 PDT
Created attachment 144430 [details] patch for landing
WebKit Review Bot
Comment 4 2012-05-28 21:11:23 PDT
Comment on attachment 144430 [details] patch for landing Clearing flags on attachment: 144430 Committed r118722: <http://trac.webkit.org/changeset/118722>
Note You need to log in before you can comment on or make changes to this bug.