Closed Bug 317294 Opened 19 years ago Closed 12 years ago

Problem with e4x initialization from an xbl component and @mozilla.org/moz/jssubscript-loader;1

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: cyril.giraudon, Assigned: cyril.giraudon)

References

Details

(Keywords: testcase)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051118 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051118 Firefox/1.5

i load a javascript file containing :"function e4xInit() {var a = <a/>;}; e4xInit();" with loadSubScript (xbl) and I obtain an NS_ERROR_NOT_IMPLEMENTED error at the line "var a = <a/>;" with ff1.5rc3 on linux.

Reproducible: Always

Actual Results:  
Error: uncaught exception: [Exception... "Method not implemented"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: chrome://mytest/content/toto.js :: e4xInit :: line 3"  data: no]

Expected Results:  
No error.
Just uncompress the zip file in an extension directory and open chrome://mytest/content/test.xul.
Look at the javascript console :
Error: uncaught exception: [Exception... "Method not implemented"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: chrome://mytest/content/toto.js :: e4xInit :: line 3"  data: no]
Attached file testcase
Testcase derived from extension. You need to download and test it locally to see the error described by the reporter.
The  js data uri is this:
function e4xInit()
{
  var a = <a/>;
}
e4xInit();
Keywords: testcase
OS: Linux → All
This has nothing to do with E4X.

http://lxr.mozilla.org/mozilla/search?string=Method%20not%20implemented

Reporter: you need to debug a bit to see where this is thrown.

/be
Assignee: general → cyril.giraudon
Prior to the exception, I get an assertion in my debug build:
###!!! ASSERTION: Write me!: 'Error', file c:/mozilla/mozilla/dom/src/base/nsDOM
ClassInfo.cpp, line 4029

This corresponds to the nsWindowSH::GetProperty function, this stuff:
      } else {
        NS_ERROR("Write me!");

        return NS_ERROR_NOT_IMPLEMENTED;
      }

      return NS_OK;
    }
I don't know if it can help but using loadSubScript with two arguments, and moving the execution instruction from toto.js to textboxes.xml makes this work fine :

var b = new Object();
var a = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
a.loadSubScript("chrome://mytest/content/toto.js", b);
b.e4xInit();
Blocks: e4x
E4X will be removed again from Spidermonkey (bug 788293)
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: