Bug 56787 - Expose "webkitIndexedDB" to Workers
Summary: Expose "webkitIndexedDB" to Workers
Status: RESOLVED DUPLICATE of bug 73609
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: David Grogan
Depends on: 57789
  Show dependency treegraph
Reported: 2011-03-21 17:28 PDT by David Grogan
Modified: 2012-01-05 14:02 PST (History)
12 users (show)

See Also:

Patch (4.73 KB, patch)
2011-03-21 17:35 PDT, David Grogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Grogan 2011-03-21 17:28:08 PDT
Expose "webkitIndexedDB" to Workers
Comment 1 David Grogan 2011-03-21 17:35:47 PDT
Created attachment 86394 [details]
Comment 2 David Grogan 2011-03-21 17:39:37 PDT
This isn't ready for actual review.

I'm tearing my hair out trying to figure out why these WorkerContext changes don't make webkitIndexedDB available in a worker.  Do you know what I'm missing?  Do I need to add some stuff to the bindings generator?
Comment 3 Jeremy Orlow 2011-03-21 17:43:07 PDT
Comment on attachment 86394 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=86394&action=review

> LayoutTests/storage/indexeddb/basics-workers.js:11
> +    shouldBeTrue("'webkitIndexedDB' in window");

I don't get it...you set window = self above (in some cases)...?  What exactly is this testing?

> Source/WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

what about the above test?

Eventually, all indexedDB tests shoudl run against workers and the main window.  It's OK to just do a few for now tho.

> Source/WebCore/workers/WorkerContext.h:206
> +

extra new line

> Source/WebCore/workers/WorkerContext.idl:139
> +

extra newline
Comment 4 Jeremy Orlow 2011-03-21 17:44:08 PDT
I'm not sure.  cc'ing others who can maybe help

Btw, you'll need to add some stuff to the idl about static tables or something like that IIRC.
Comment 5 Jeremy Orlow 2011-03-21 17:45:27 PDT
Also, note that you'll need to land code to make the IndexedDBDispatcher (and maybe other things?  not positive) thread-safe before landing this so that we don't break isolates.
Comment 6 Early Warning System Bot 2011-03-21 17:45:41 PDT
Attachment 86394 [details] did not build on qt:
Build output: http://queues.webkit.org/results/8221096
Comment 7 David Levin 2011-03-21 17:48:21 PDT
Make sure to add " NoStaticTables" to the idl that you are exposing. (Search for where it is used in other places.)

Your syntax for EnabledAtRuntime appears to be incorrect. (Look for where it is used in other places.) When you get it correct, you'll actually need to do work to expose turn on the flag. (Search for what other places do for their flag).
Comment 8 Build Bot 2011-03-21 17:54:06 PDT
Attachment 86394 [details] did not build on win:
Build output: http://queues.webkit.org/results/8221100
Comment 9 David Levin 2011-03-21 18:02:09 PDT
(In reply to comment #7)
> Your syntax for EnabledAtRuntime appears to be incorrect. (Look for where it is used in other places.) 

Drew pointed out that this part of my comment was incorrect. :)

But the key is to understand this flag.
Comment 10 Andrew Wilson 2011-03-21 18:19:04 PDT
I would strongly recommend looking at the generated code for this attribute and then maybe step through the code in a debugger - apologies if you've already done this, but pretty much any time I've run into issues with creating new JS bindings (and I *always* run into issues) I have to actually step through the bindings code to figure it out.

I was mentioning to Dave that the bindings code is like 90% boilerplate, but small problems with the boilerplate result in really difficult to diagnose problems.
Comment 11 Collabora GTK+ EWS bot 2011-03-28 16:11:01 PDT
Attachment 86394 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/8276377
Comment 12 David Grogan 2012-01-05 14:02:34 PST

*** This bug has been marked as a duplicate of bug 73609 ***