Since changes to fix bug 254778 made the parser the sole source of syntax error reports, it removed the need to check for errors after tree transformation.
The patch removes those checks and moves all reporting about syntax errors into omj/Parser.java.
Since E4X implementation needs to know the activation scope for tracking of default namespaces, previously an elaborated schema was added to set/restore the activation scope which relied on the fact that scrip and function with activation record should always call special entry/exit functions.
But that does not work for functions without activation records since they never call any special entry/exit pairs. So if application call such function directly, the function would not store its top scope anywhere and the E4X subsystem would not be able to get E4X library object.
The patch fixes with introduction of 2 functions, hasTopCall and doTopCall to ScriptRuntime and adding the following code prefix to each implementation of Callable.call that can start execution of script code:
public Object call(Context cx, Scriptable scope,
Scriptable thisObj, Object[] args)
throws JavaScriptException
{
// Prefix start
if (!ScriptRuntime.hasTopCall(cx)) {
return ScriptRuntime.doTopCall(this, cx, scope, thisObj, args);
}
// Prefix end
...
In this way there is always registered top scope during script execution and the previous elaborated schema became unnecessary so I reverted that part to almost pre-E4x state.
fails, which means that code expecting the result of that function call
is somewhat unhappy, to the tune of:
Error: inspector is not defined
Source File: chrome://inspector/content/sidebar.js
Line: 142
r=caillon rs(sr)=neil
File picker cleanup:
- Pressing enter now actives the save/open buttons.
- Fixes issue for clobber builds where the file chooser would not always get
registered. Unfortunately, this still can not be guaranteed to work because of
how XPCOM (mis)handles multiple components registered with the same contract
ID. See bug 253136.
- The native widget component factory constructor now handles the logic for
which implementation to choose. This allows me to remove the proxy logic from
the implementation itself.
- Remembers the last selected directory between invocations.
- Removes some debug stuff I forgot to remove.
- Gets rid of the static nsString cruft that got accidentally added while I was
copying over stuff from other implementations.
r+sr=blizzard