Closed Bug 560572 Opened 14 years ago Closed 14 years ago

Workers: ChromeWorker breaks --disable-ctypes builds

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

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

References

Details

Attachments

(1 file)

I didn't realize that we had that option. Need to fix.
Attached patch PatchSplinter Review
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #440265 - Flags: review?(dwitte)
Comment on attachment 440265 [details] [diff] [review]
Patch

>diff --git a/dom/src/threads/test/chromeWorker_subworker.js b/dom/src/threads/test/chromeWorker_subworker.js

>-if (!ctypes) {
>-  throw "No ctypes!";
>-}

So this will make tests fail, right? Up to you, but I'm not so sure we want that -- it's gonna add noise for people who don't want a ctypes build and are happy living without the features it provides to other subsystems.

If you think ctypes should be an integral feature of workers in the browser, though -- in effect, a contract -- then I'm fine with it. (Can people disable workers?)

r=me either way.
Attachment #440265 - Flags: review?(dwitte) → review+
Yeah, those are "-", not "+", so this works the way you want it to ;)

http://hg.mozilla.org/mozilla-central/rev/f8f6c5be311a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 440265 [details] [diff] [review]
Patch

>   if (mPrivilegeModel == CHROME) {
>     // Add chrome functions.
>     success = JS_DefineFunctions(aCx, global, gDOMWorkerChromeFunctions);
>     NS_ENSURE_TRUE(success, PR_FALSE);
> 
>+#ifdef BUILD_CTYPES
>     // Add the lazy getter for ctypes.
>     success = JS_DefineProperty(aCx, global, "ctypes", JSVAL_VOID,
>                                 nsDOMWorkerFunctions::CTypesLazyGetter, nsnull,
>                                 0);
>     NS_ENSURE_TRUE(success, PR_FALSE);
>   }
>+#endif

Oh?
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: