Last Comment Bug 722348 - remove JSRuntime::requestCount
: remove JSRuntime::requestCount
Status: RESOLVED FIXED
: dev-doc-needed
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla12
Assigned To: Igor Bukanov
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 722345
  Show dependency treegraph
 
Reported: 2012-01-30 08:59 PST by Igor Bukanov
Modified: 2012-02-07 23:00 PST (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (9.09 KB, patch)
2012-01-30 09:14 PST, Igor Bukanov
luke: review+
Details | Diff | Splinter Review

Description Igor Bukanov 2012-01-30 08:59:53 PST
With single-threaded runtime JSRuntime::requestCount is no longer necessary as the use of the counter can be replaced with checking if JSRuntime::requestDepth >= 0.
Comment 1 Igor Bukanov 2012-01-30 09:14:51 PST
Created attachment 592742 [details] [diff] [review]
v1

Besides removing JSRuntime::requestCount the patch also removes unused js_NextActiveContext and requires that js_DestroyContext should be called outside the request. This is to allow to simplify s_DestroyContext and minimize other patches for bug 722345.
Comment 2 Luke Wagner [:luke] 2012-01-30 09:19:43 PST
Note: empty r?
Comment 3 Luke Wagner [:luke] 2012-01-30 09:28:52 PST
Comment on attachment 592742 [details] [diff] [review]
v1

Great

>+        } else if (mode == JSDCM_FORCE_GC) {
>+            js_GC(cx, NULL, GC_NORMAL, gcreason::DESTROY_CONTEXT);
>+        } else if (mode == JSDCM_MAYBE_GC) {
>                 JS_MaybeGC(cx);

unindent
Comment 5 Ed Morley [:emorley] 2012-01-31 07:03:36 PST
https://hg.mozilla.org/mozilla-central/rev/b7e5bbe0003d

Note You need to log in before you can comment on or make changes to this bug.