WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24616
Add custom V8 bindings for DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=24616
Summary
Add custom V8 bindings for DOMWindow
Mike Belshe
Reported
2009-03-16 07:17:44 PDT
Custom bindings for the DOMWindow under v8.
Attachments
patch
(25.77 KB, patch)
2009-03-25 13:01 PDT
,
Mike Belshe
dglazkov
: review-
Details
Formatted Diff
Diff
patch w/ Dimitri's comments
(25.93 KB, patch)
2009-03-26 10:05 PDT
,
Mike Belshe
dglazkov
: review+
Details
Formatted Diff
Diff
use notImplementedByInterceptor()
(25.94 KB, patch)
2009-03-26 13:59 PDT
,
Mike Belshe
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mike Belshe
Comment 1
2009-03-25 13:01:54 PDT
Created
attachment 28941
[details]
patch
Eric Seidel (no email)
Comment 2
2009-03-25 16:04:41 PDT
Sam will likely be curious about this change too.
Dimitri Glazkov (Google)
Comment 3
2009-03-26 07:38:42 PDT
Comment on
attachment 28941
[details]
patch These are all style-nits, obviously the code works and is good otherwise. Bug URL in ChangeLog.
> + WindowSetLocation(imp, ToWebCoreString(value));
toWebCoreString
> + String eventType = ToWebCoreString(args[0]);
toWebCoreString
> + String eventType = ToWebCoreString(args[0]);
toWebCoreString
> + String message = ToWebCoreString(args[0]);
toWebCoreString
> + WindowFeatures wargs;
wargs -> windowFeatures? No strong feelings here, just wargs sounds a bit overcondensed.
> + (!parseURL(urlString).startsWith("javascript:", false) || > + ScriptController::isSafeScript(frame))) {
|| goes on new line or you could just remove line break
> + return v8::Handle<v8::Value>();
notHandledByInterceptor() here and elsewhere in this method.
> + String propName = ToWebCoreString(name);
toWebCoreString
> + static HashMap<String, String> kLazyInitMap;
kLazyInitMap -> lazyInitMap
> + if (context.IsEmpty()) return v8::Handle<v8::Value>();
return on new line.
> + if (!parseURL(v).startsWith("javascript:", false) ||
|| on new line or remove line break
> + int handle = ToInt32(args[0]);
toInt32
Dimitri Glazkov (Google)
Comment 4
2009-03-26 07:39:07 PDT
Comment on
attachment 28941
[details]
patch Whoops, I meant r-.
Mike Belshe
Comment 5
2009-03-26 10:05:01 PDT
Created
attachment 28972
[details]
patch w/ Dimitri's comments
Dimitri Glazkov (Google)
Comment 6
2009-03-26 13:13:18 PDT
Comment on
attachment 28972
[details]
patch w/ Dimitri's comments Good enough. The following are nice, but not required.
> + return v8::Handle<v8::Value>();
notHandledByInterceptor()
> + if (!name->IsString()) > + return v8::Handle<v8::Value>();
notHandledByInterceptor()
> + if (holder.IsEmpty()) > + return v8::Handle<v8::Value>();
notHandledByInterceptor()
> + if (!window) > + return v8::Handle<v8::Value>();
notHandledByInterceptor()
> + Frame* frame = window->frame(); > + // window is detached from a frame. > + if (!frame) > + return v8::Handle<v8::Value>();
notHandledByInterceptor()
> + > + return v8::Handle<v8::Value>();
notHandledByInterceptor()
Mike Belshe
Comment 7
2009-03-26 13:59:43 PDT
Created
attachment 28983
[details]
use notImplementedByInterceptor()
Dimitri Glazkov (Google)
Comment 8
2009-03-28 09:49:19 PDT
Landed as
http://trac.webkit.org/changeset/42071
.
Dimitri Glazkov (Google)
Comment 9
2009-03-28 09:50:29 PDT
Whoops, I just realized this file is in the wrong place. It should be in bindings/v8/custom.
Dimitri Glazkov (Google)
Comment 10
2009-03-28 10:01:23 PDT
Fix landed in
http://trac.webkit.org/changeset/42072
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug