WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
27698
[V8] Database callbacks get wrong isolated world
https://bugs.webkit.org/show_bug.cgi?id=27698
Summary
[V8] Database callbacks get wrong isolated world
Adam Barth
Reported
2009-07-27 01:36:02 PDT
This looks broken from code inspection. I haven't tested yet. Frame* frame = V8Proxy::retrieveFrame(); [...] callback = V8CustomSQLStatementCallback::create(args[2], frame); [...] v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get()); The callbacks should just hold onto a v8::Context. Right now, they should get the v8::Context::GetCurrent() context. (This is also wrong, but that's another bug.)
Attachments
patch
(38.06 KB, patch)
2010-04-07 17:37 PDT
,
Dumitru Daniliuc
dumi
: commit-queue-
Details
Formatted Diff
Diff
patch
(38.84 KB, patch)
2010-04-08 16:24 PDT
,
Dumitru Daniliuc
eric
: review-
dumi
: commit-queue-
Details
Formatted Diff
Diff
patch
(41.30 KB, patch)
2010-04-09 19:35 PDT
,
Dumitru Daniliuc
abarth
: review+
dumi
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2009-07-27 01:37:03 PDT
I'd like the OwnHandle class from
Bug 27533
before fixing this code.
Adam Barth
Comment 2
2010-03-03 15:27:29 PST
Bug 34726
shows how to do a this right.
Dumitru Daniliuc
Comment 3
2010-04-07 17:37:36 PDT
Created
attachment 52810
[details]
patch Apologies for uploading a huge patch: it's really just 1 change applied to 5 different locations. Adam, please review the changes to the V8 bindings. Gavin, please review the changes to the JSC bindings + ScriptController.{h|cpp}.
WebKit Review Bot
Comment 4
2010-04-07 17:41:25 PDT
Attachment 52810
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/bindings/js/ScriptController.cpp:172: An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement. [readability/control_flow] [4] WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp:70: One space before end of line comments [whitespace/comments] [5] WebCore/bindings/js/ScriptController.h:43: Code inside a namespace should not be indented. [whitespace/indent] [4] WebCore/storage/SQLTransactionErrorCallback.h:38: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 4 in 35 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 5
2010-04-07 18:11:19 PDT
Attachment 52810
[details]
did not build on gtk: Build output:
http://webkit-commit-queue.appspot.com/results/1694006
Dumitru Daniliuc
Comment 6
2010-04-08 16:24:05 PDT
Created
attachment 52913
[details]
patch
Eric Seidel (no email)
Comment 7
2010-04-08 16:33:58 PDT
Attachment 52913
[details]
did not build on mac: Build output:
http://webkit-commit-queue.appspot.com/results/1609345
WebKit Review Bot
Comment 8
2010-04-08 19:15:05 PDT
Attachment 52913
[details]
did not build on gtk: Build output:
http://webkit-commit-queue.appspot.com/results/1671181
Adam Barth
Comment 9
2010-04-08 22:19:03 PDT
So much copy/paste code. :( + RefPtr<Frame> m_frame I though we decided we wanted to hold a ScriptExecutionContext instead of a m_frame.
Jeremy Orlow
Comment 10
2010-04-09 05:36:09 PDT
(In reply to
comment #9
)
> So much copy/paste code. :( > > + RefPtr<Frame> m_frame > > I though we decided we wanted to hold a ScriptExecutionContext instead of a > m_frame.
I was the one talking about eliminating it, but it's fairly easy for Dumi to fix now. Dumi: Take a look at IDBCallbacks.h + V8CustomIDBCallbacks.h It's really not much harder to use the ActiveDOMObject stuff rather than storing a ref to the Frame (which is incorrect for several reasons) and it'll allow you to get notifications when the frame is going away (so you shouldn't do the callback...and should probably cancel the transaction). Whether or not you do that, I'll be trying to unify our callback code at some point.
Geoffrey Garen
Comment 11
2010-04-09 10:04:11 PDT
JSC looks good to me.
Eric Seidel (no email)
Comment 12
2010-04-09 14:10:11 PDT
Comment on
attachment 52913
[details]
patch Looks like this breaks the mac and gtk builders.
Dumitru Daniliuc
Comment 13
2010-04-09 19:35:47 PDT
Created
attachment 53030
[details]
patch Same patch. Changed some #includes to make them similar in all callbacks. Should build on all ports now.
Adam Barth
Comment 14
2010-04-12 23:01:07 PDT
Comment on
attachment 53030
[details]
patch I feel like this patch highlights a ton of redundant code that might be profitably refactored or autogenerated. Thanks for updating the patch.
Dumitru Daniliuc
Comment 15
2010-04-13 15:16:03 PDT
Landed as
r57530
.
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