Last Comment Bug 753642 - Rip out the codegen for the Xray-related bits of worker bindings, since we don't have Xrays in workers
: Rip out the codegen for the Xray-related bits of worker bindings, since we do...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on: 753522
Blocks: 740069
  Show dependency treegraph
 
Reported: 2012-05-09 21:56 PDT by Boris Zbarsky [:bz]
Modified: 2012-05-24 11:02 PDT (History)
3 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Rip out the codegen for the Xray-related bits of worker bindings, since we don't have Xrays in workers. (7.87 KB, patch)
2012-05-14 20:09 PDT, Boris Zbarsky [:bz]
peterv: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] 2012-05-09 21:56:16 PDT
If you look at the generated code in XMLHttpRequestBinding.cpp, in the worker part, then CreateInterfaceObjects does this:

  if (sMethods_ids[0] == JSID_VOID &&
      (!InitIds(aCx, sMethods, sMethods_ids) ||
       !InitIds(aCx, sAttributes, sAttributes_ids) ||
       !InitIds(aCx, sConstants, sConstants_ids))) {

but EnumerateProperties does this:

    for (size_t i = 0; i < sizeof(sChromeAttributes_ids); ++i) {
    if ((sChromeAttributes[i].flags & JSPROP_ENUMERATE) &&
        !props.append(sChromeAttributes_ids[i])) {

and similar for ResolveProperty.  Looks pretty fishy.  This happens because CGCreateInterfaceObjectsMethod is doing:

            if props.hasChromeOnly() and not self.descriptor.workers:
                idsToInit.append(props.variableName(True))

Maybe this is all a non-issue because there are no Xrays in workers, but then we just shouldn't generate EnumerateProperties/ResolveProperty for workers, right?
Comment 1 Boris Zbarsky [:bz] 2012-05-14 20:09:34 PDT
Created attachment 623920 [details] [diff] [review]
Rip out the codegen for the Xray-related bits of worker bindings, since we don't have Xrays in workers.

Ben says no Xrays in workers, so let's just not generate this gunk.
Comment 3 Ed Morley [:emorley] 2012-05-24 10:46:54 PDT
https://hg.mozilla.org/mozilla-central/rev/6223b41be383

Note You need to log in before you can comment on or make changes to this bug.