Closed Bug 723021 Opened 13 years ago Closed 13 years ago

Move stackLimit to JSRuntime

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: igor, Assigned: igor)

References

Details

Attachments

(1 file)

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.
Attached patch v1Splinter Review
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 on attachment 593334 [details] [diff] [review] v1 Very nice.
Attachment #593334 - Flags: review?(luke) → review+
Blocks: 722345
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: