WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25170
Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings.
https://bugs.webkit.org/show_bug.cgi?id=25170
Summary
Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings.
Jian Li
Reported
2009-04-13 17:32:58 PDT
Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings.
Attachments
Proposed Patch
(18.80 KB, patch)
2009-04-13 17:45 PDT
,
Jian Li
dglazkov
: review+
Details
Formatted Diff
Diff
Proposed Patch
(18.64 KB, patch)
2009-04-17 11:04 PDT
,
Jian Li
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jian Li
Comment 1
2009-04-13 17:45:07 PDT
Created
attachment 29449
[details]
Proposed Patch
Dimitri Glazkov (Google)
Comment 2
2009-04-16 20:40:53 PDT
Comment on
attachment 29449
[details]
Proposed Patch Apologies for the delay. Good scrubbing! Needs just a few more changes.
> +ACCESSOR_GETTER(WorkerContextSelf) {
Brace on new line.
> +ACCESSOR_GETTER(WorkerContextOnmessage) {
Ditto.
> +ACCESSOR_SETTER(WorkerContextOnmessage) {
Ditto.
> +v8::Handle<v8::Value> SetTimeoutOrInterval(const v8::Arguments& args, bool singleShot) {
Ditto.
> +v8::Handle<v8::Value> ClearTimeoutOrInterval(const v8::Arguments& args) {
Ditto.
> + int tid = ToInt32(args[0], ok);
toInt32, and let's expand tid to timerId.
> +CALLBACK_FUNC_DECL(WorkerContextImportScripts) {
Brace on new line.
> +CALLBACK_FUNC_DECL(WorkerContextSetTimeout) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerContextClearTimeout) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerContextSetInterval) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerContextClearInterval) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerContextAddEventListener) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerContextRemoveEventListener) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerConstructor) {
Ditto.
> + if (!WorkerContextExecutionProxy::isWebWorkersEnabled()) { > + V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Worker is not enabled."); > + return v8::Undefined();
Use throwError helper from V8Proxy.
> + V8Proxy::ThrowError(V8Proxy::TYPE_ERROR, "DOM object constructor cannot be called as a function."); > + return v8::Undefined();
Ditto.
> + if (args.Length() == 0) { > + V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments"); > + return v8::Undefined();
Ditto.
> + if (tryCatch.HasCaught()) { > + v8::ThrowException(tryCatch.Exception()); > + return v8::Undefined();
Ditto.
> +ACCESSOR_GETTER(WorkerOnmessage) {
Brace on new line.
> +ACCESSOR_SETTER(WorkerOnmessage) {
Ditto.
> +ACCESSOR_GETTER(WorkerOnerror) {
Ditto.
> +ACCESSOR_SETTER(WorkerOnerror) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerAddEventListener) {
Ditto.
> +CALLBACK_FUNC_DECL(WorkerRemoveEventListener) {
Ditto.
Jian Li
Comment 3
2009-04-17 11:04:32 PDT
Created
attachment 29583
[details]
Proposed Patch All issues fixed.
Dimitri Glazkov (Google)
Comment 4
2009-04-17 14:34:58 PDT
Comment on
attachment 29583
[details]
Proposed Patch Even better.
Dmitry Titov
Comment 5
2009-04-18 18:42:19 PDT
landed:
http://trac.webkit.org/changeset/42648
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