Bug 31367 - [V8] Make bindings return NULL handles instead of calling v8::Undefined().
Summary: [V8] Make bindings return NULL handles instead of calling v8::Undefined().
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Jens Alfke
Depends on:
Reported: 2009-11-11 11:44 PST by Jens Alfke
Modified: 2009-11-11 11:53 PST (History)
0 users

See Also:

patch (4.25 KB, patch)
2009-11-11 11:47 PST, Jens Alfke
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Alfke 2009-11-11 11:44:19 PST
The generated code for V8 bindings uses "return v8::Undefined()" when it needs to return from the binding without a specific return value (e.g. on error, or if the result is undefined.) This results in a function call. V8 interprets a return value of an empty/NULL handle as being the same as Undefined(), so I've changed the bindings to do that. This makes the bindings slightly smaller and faster, as there are many instances of this construct.
Comment 1 Jens Alfke 2009-11-11 11:47:21 PST
Created attachment 42986 [details]
Comment 2 Dimitri Glazkov (Google) 2009-11-11 11:51:40 PST
Comment on attachment 42986 [details]

r=me. Thanks!
Comment 3 Jens Alfke 2009-11-11 11:53:40 PST
Committed revision 50831.