WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
30678
Database thread initialization not properly ifdef'ed for JSC vs V8
https://bugs.webkit.org/show_bug.cgi?id=30678
Summary
Database thread initialization not properly ifdef'ed for JSC vs V8
Steve Block
Reported
2009-10-22 10:07:25 PDT
WebCore/storage/Database.cpp and WebCore/loader/icon/IconDatabase.cpp both use calls to initializeThreading(). These calls must be properly ifdef'ed to use the appropriate JS engine - JSC or V8. These ifdefs are incomplete.
Attachments
Patch 1 for Bug 30678
(2.57 KB, patch)
2009-10-22 10:11 PDT
,
Steve Block
eric
: review-
Details
Formatted Diff
Diff
Patch 2 for Bug 30678
(6.06 KB, patch)
2009-10-23 09:58 PDT
,
Steve Block
no flags
Details
Formatted Diff
Diff
Patch 3 for Bug 30678
(5.97 KB, patch)
2009-10-26 11:45 PDT
,
Steve Block
eric
: review+
steveblock
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Steve Block
Comment 1
2009-10-22 10:11:52 PDT
Created
attachment 41665
[details]
Patch 1 for
Bug 30678
Eric Seidel (no email)
Comment 2
2009-10-22 10:39:10 PDT
Why can't we share this code? Can't we make this go through ScriptController or otherwise make it generic? This seems like the wrong approach.
Eric Seidel (no email)
Comment 3
2009-10-22 10:39:44 PDT
Comment on
attachment 41665
[details]
Patch 1 for
Bug 30678
r- for above reasons. At least the headers could easily use the same paths using things like ForwardingHeaders.
Dimitri Glazkov (Google)
Comment 4
2009-10-22 12:07:00 PDT
AFAIK, there's no V8::initializeThreading defined anywhere?
Steve Block
Comment 5
2009-10-23 09:58:12 PDT
Created
attachment 41730
[details]
Patch 2 for
Bug 30678
> Can't we make this go through ScriptController or otherwise make it generic?
Done
> AFAIK, there's no V8::initializeThreading defined anywhere?
Sorry, yes, my patches got out of order. This code is now included in this patch.
Eric Seidel (no email)
Comment 6
2009-10-23 11:08:42 PDT
Comment on
attachment 41730
[details]
Patch 2 for
Bug 30678
+ // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly. The code does not back that up. The JSC version has no reentrancy guard, but the V8 one does. That seems to have little to do with darwin vs. non-darwin.
Steve Block
Comment 7
2009-10-26 11:45:40 PDT
Created
attachment 41878
[details]
Patch 3 for
Bug 30678
> (From update of
attachment 41730
[details]
) > + // Darwin is an exception to this rule: it is OK to call this function > from any thread, even reentrantly.
>
> The code does not back that up. The JSC version has no reentrancy guard, but > the V8 one does. That seems to have little to do with darwin vs. non-darwin.
You're right that the comment about Darwin on V8 is wrong - that was a copy-paste error - now fixed. The comment for the JSC version is taken from JSC::initializeThreading() in JavaScriptCore/runtime/InitializeThreading.h, so should be correct. The implementation of ScriptController::initializeThreading() for V8 is the same as the logic in JSC::initializeThreading() (less the Darwin and JSC specifics). Both guard against repeated calls to the function.
Eric Seidel (no email)
Comment 8
2009-10-27 17:06:26 PDT
Comment on
attachment 41878
[details]
Patch 3 for
Bug 30678
Looks sane. You might consider adding a comment in ScriptControolerV8::initializeThreading that any early-init calls which v8 needs for multi-threaded operation should be made there.
Steve Block
Comment 9
2009-10-28 06:54:07 PDT
Comment on
attachment 41878
[details]
Patch 3 for
Bug 30678
Commit queue is offline. Landing manually.
Steve Block
Comment 10
2009-10-28 06:55:38 PDT
Committed
r50215
: <
http://trac.webkit.org/changeset/50215
>
Eric Seidel (no email)
Comment 11
2009-10-28 09:56:30 PDT
Sorry. The commit-queue recently got the hiccups. :(
bug 30869
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