WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49613
[V8] ASSERT(WTF::isMainThread()) fails in V8Binding::int32ToWebCoreString in workers
https://bugs.webkit.org/show_bug.cgi?id=49613
Summary
[V8] ASSERT(WTF::isMainThread()) fails in V8Binding::int32ToWebCoreString in ...
Kinuko Yasuda
Reported
2010-11-16 12:52:10 PST
ASSERT(WTF::isMainThread()) fails in V8Binding::int32ToWebCoreString in workers. In worker case, javascript is executed by a worker thread but not by the main thread so this assertion always fails. For example, running the following test in chromium hits the assertion failure. fast/workers/storage/execute-sql-args-worker.html
Attachments
Proposing patch
(2.20 KB, patch)
2010-11-16 12:57 PST
,
Kinuko Yasuda
japhet
: review+
japhet
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kinuko Yasuda
Comment 1
2010-11-16 12:57:59 PST
Created
attachment 74028
[details]
Proposing patch
Nate Chapin
Comment 2
2010-11-16 13:10:32 PST
Comment on
attachment 74028
[details]
Proposing patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74028&action=review
Other than the style nits, this looks ok. However, I'd appreciate it if you waited for antonm to agree before committing :)
> WebCore/bindings/v8/V8Binding.cpp:390 > } else > - webCoreString = String::number(value); > + webCoreString = String::number(value);
Indent 4.
> WebCore/bindings/v8/V8Binding.cpp:399 > + if (WTF::isMainThread()) > + return int32ToWebCoreStringFast(value);
Indent 4.
anton muhin
Comment 3
2010-11-16 23:19:33 PST
Comment on
attachment 74028
[details]
Proposing patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74028&action=review
> WebCore/bindings/v8/V8Binding.cpp:398 > + if (WTF::isMainThread())
Please, check by running
http://dromaeo.com/?dom
performance implications. I haven't looked into this code for some time, but WTF::isMainThread apparently used to be pretty expensive.
Nate Chapin
Comment 4
2010-11-17 09:57:25 PST
(In reply to
comment #3
)
> (From update of
attachment 74028
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=74028&action=review
> > > WebCore/bindings/v8/V8Binding.cpp:398 > > + if (WTF::isMainThread()) > > Please, check by running
http://dromaeo.com/?dom
performance implications. > > I haven't looked into this code for some time, but WTF::isMainThread apparently used to be pretty expensive.
IIRC, globalObjectPrototypeIsDOMWindow() in V8DOMWrapper.cpp is a fairly cheap check for whether we're in a worker context or not. Should we try to generalize that and put it somewhere public?
Kinuko Yasuda
Comment 5
2010-11-17 19:50:15 PST
I ran the dromaeo test with and w/o this patch (on my local linux box). I didn't re-run the test more than twice for each, but the results looked ok/good to me, i.e. there doesn't seem a visible performance impact. Before (w/o this patch):
http://dromaeo.com/?id=123148
1441.23runs/s (Total)
http://dromaeo.com/?id=123179
1418.11runs/s (Total) After (with this patch):
http://dromaeo.com/?id=123150
1437.06runs/s (Total)
http://dromaeo.com/?id=123177
1426.23runs/s (Total)
anton muhin
Comment 6
2010-11-17 23:27:33 PST
Thank you very much, Kinuko! (In reply to
comment #5
)
> I ran the dromaeo test with and w/o this patch (on my local linux box). > I didn't re-run the test more than twice for each, but the results looked ok/good to me, i.e. there doesn't seem a visible performance impact. > > Before (w/o this patch): > >
http://dromaeo.com/?id=123148
> 1441.23runs/s (Total) >
http://dromaeo.com/?id=123179
> 1418.11runs/s (Total) > > After (with this patch): > >
http://dromaeo.com/?id=123150
> 1437.06runs/s (Total) >
http://dromaeo.com/?id=123177
> 1426.23runs/s (Total)
Kinuko Yasuda
Comment 7
2010-11-18 17:32:26 PST
Committed
r72354
: <
http://trac.webkit.org/changeset/72354
>
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