Closed Bug 788149 Opened 13 years ago Closed 13 years ago

Empty dictionary for worker objects

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: baku, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

Attached file test
Applying the attached patch, this is the output that I see: TEST_PATH=dom/workers/test/test_xhr_params.html make -C ../build/ mochitest-plain BAKU CONSTRUCTOR: 1 0 TEST-PASS | unknown test url | XHR exists! TEST-PASS | unknown test url | mozAnon == true - true should equal true ... Then, refreshing the page: BAKU CONSTRUCTOR: 0 0 TEST-PASS | unknown test url | XHR exists! TEST-UNEXPECTED-FAIL | unknown test url | mozAnon == true - got false, expected true ... The MozXMLHttpRequestParametersWorkers seems empty: printf("BAKU CONSTRUCTOR: %d %d\n", aParams.mozAnon, aParams.mozSystem);
Blocks: 761227
Stepping through this on the reload, I see: JS_HasPropertyById(cx, &val.toObject(), mozAnon_id, &found) (gdb) p found $1 = 0 I wonder... We end up with separate jsruntimes for the different workers, don't we? So we can't actually use jsid here, I bet. :(
yep, Any worker has a separated JSRuntime. Any implication using JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp) ?
Well, yes, it's slower. ;) Patch coming up to do just that on workers, though. I'll include a variant of the attached test that fails reliably without requiring a reload.
Actually, maybe it's better to just land the test as part of bug 761227. I'll just attach a diff against the test patch in this bug.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Attachment #658077 - Flags: review?(peterv) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/73642fc72b2e Still needs a test, but I assume that will land as part of bug 761227?
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla18
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: