Closed Bug 772700 Opened 12 years ago Closed 12 years ago

OOP from a JS component or JSM doesn't work

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Need to set up the actor machinery for windowless usage. Currently it crashes. And then I guess I need to figure out some way to test this combination :-/
Assignee: nobody → bent.mozilla
Attached patch Patch, v1 (deleted) — Splinter Review
This patch is pretty simple, but the testing is a bit messy. Anyway, I figured out how to mirror a JSM/JSComponent global so that I don't have to rework all the ownership stuff in the parent. I'm using a BackstagePass with a Null principal (not "no" principal), so if it ever escapes somehow it can't actually do anything. We only need it for the event handling stuff that happens during the open sequence. Everything seems to work!
Attachment #641707 - Flags: review?(khuey)
Attachment #641707 - Flags: review?(jonas)
Comment on attachment 641707 [details] [diff] [review] Patch, v1 Review of attachment 641707 [details] [diff] [review]: ----------------------------------------------------------------- I think mrbkap or bholley should review the XPConnect abuse here. ::: dom/indexedDB/IDBFactory.cpp @@ +182,5 @@ > +IDBFactory::Create(IDBFactory** aFactory) > +{ > + NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); > + NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); > + NS_ASSERTION(nsContentUtils::IsCallerChrome(), "Only for chrome!"); I think instead of checking that the caller is chrome, you should check that the top JSContext on the stack is null.
Attachment #641707 - Flags: review?(khuey) → review+
Attached patch Use a sandbox global, v1 (deleted) — Splinter Review
Applies on top of the previous patch.
Attachment #642158 - Flags: review?(mrbkap)
Comment on attachment 642158 [details] [diff] [review] Use a sandbox global, v1 r=me with a comment about why we need to unwrap there.
Attachment #642158 - Flags: review?(mrbkap) → review+
Somehow the last time we ran the xpcshell tests on mac even though I tried to disable them. This time I've restricted them to just windows (hopefully). https://hg.mozilla.org/integration/mozilla-inbound/rev/06ba7dd9f841
https://tbpl.mozilla.org/php/getParsedLog.php?id=13527895&tree=Mozilla-Inbound TEST-INFO | /Users/cltbld/talos-slave/test/build/xpcshell/tests/dom/indexedDB/ipc/unit/test_add_put.js | running test ... command timed out: 1200 seconds without output, attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2725.067969 TinderboxPrint: xpcshell<br/><em class="testfail">T-FAIL</em> buildbot.slave.commands.TimeoutError: command timed out: 1200 seconds without output, attempting to kill TinderboxPrint: xpcshell<br/><em class="testfail">timeout</em> Backout, please.
Yes, they don't work on mac. I've tried two different ways to disable them there, but I'm obviously not getting something right. Anyway, disabled entirely: https://hg.mozilla.org/integration/mozilla-inbound/rev/6166a8e28786
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Followup to run the tests somewhere, please.
Blocks: 776300
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: