Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Move stackLimit to JSRuntime

RESOLVED FIXED in mozilla13

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Igor Bukanov, Assigned: Igor Bukanov)

Tracking

(Blocks: 1 bug)

unspecified
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
With thread-bound JSRuntime there is little reason to keep the native stack limits in JSContext as that requires for each JSContext instance to set the limit essentially to the same value instead of doing once per runtime initialization/SetOwnThread calls.
(Assignee)

Comment 1

6 years ago
Created attachment 593334 [details] [diff] [review]
v1

The patch stores the stack limit parameters in JSRuntime and updates the API to reflect that.

The patch also removes the function call overhead from JS_CHECK_RECURSION that is very frequently used by the parser/scanner - now the implementation uses base structs for JSContext and JSRuntime that contains fields exposed in jsfriendapi.h. Then the code just casts the passed JSContext and JSRuntime to those structs to access the relevant fields.
Attachment #593334 - Flags: review?(luke)

Comment 2

6 years ago
Comment on attachment 593334 [details] [diff] [review]
v1

Very nice.
Attachment #593334 - Flags: review?(luke) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a11bcb3dcb8
(Assignee)

Updated

6 years ago
Blocks: 722345

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/9a11bcb3dcb8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.