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)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
(deleted),
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Updated•12 years ago
|
Assignee: nobody → bent.mozilla
Assignee | ||
Comment 1•12 years ago
|
||
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+
Assignee | ||
Comment 3•12 years ago
|
||
Applies on top of the previous patch.
Attachment #642158 -
Flags: review?(mrbkap)
Comment 4•12 years ago
|
||
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+
Assignee | ||
Updated•12 years ago
|
Attachment #641707 -
Flags: review?(jonas)
Assignee | ||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
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
Comment 8•12 years ago
|
||
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.
Assignee | ||
Comment 9•12 years ago
|
||
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
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/06ba7dd9f841
https://hg.mozilla.org/mozilla-central/rev/6166a8e28786
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Comment 11•12 years ago
|
||
Followup to run the tests somewhere, please.
You need to log in
before you can comment on or make changes to this bug.
Description
•