Closed
Bug 810062
Opened 13 years ago
Closed 13 years ago
xpcshell: “-n” option of the does not enable TI.
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: nbp, Assigned: nbp)
References
Details
Attachments
(1 file)
5.59 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
It seems that TI inference JSContext::typeInferenceEnabled does not rely on JSContext::hasRunOption or it does not act when the option the toggled.
File as a Javascript Engine bug, because the JSOPTION_TYPE_INFERENCE is correctly set.
Assignee | ||
Comment 1•13 years ago
|
||
I compared how the shell initialized TI. Ti is initialized with the compartment init function (in jsinfer.cpp) which read from the JSContext* to determine if TI should be enabled or not. In the shell this happens when the global object is created.
Unfortunately the global JSOPTION flags are toggled after creating the global object, which mean that the compartment of the global object does not get TI enabled because the context did not had TI enabled at this time.
Moving parts of the argument processing (the part which does not depend on the global object), should do it the trick.
Assignee: general → nobody
Component: JavaScript Engine → XPConnect
Assignee | ||
Comment 2•13 years ago
|
||
Type inference need to be enabled in the JSContext which is creating the compartment when it is initialized. The current option processing of the xpcshell toggle the option too late to enable it in the default compartment of the xpcshell.
This patch split the processing of arguments in 2 parts, one dealing with the arguments needed for the compartment initialization, and one needed for the xpcshell initialization, once we have a global object, which means after the compartment creation.
In addition, this patch add a -I option for enabling IonMonkey in the xpcshell.
Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
Attachment #681832 -
Flags: review?(bhackett1024)
Comment 3•13 years ago
|
||
Comment on attachment 681832 [details] [diff] [review]
Toggle JSOPTION before the compartment creation.
Review of attachment 681832 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/shell/xpcshell.cpp
@@ +1291,2 @@
> case 'n':
> + // JS_ToggleOption
This comment should point to ProcessArgsForCompartment
Attachment #681832 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•