MCPcopy Create free account
hub / github.com/mozilla/rhino / exit

Method exit

rhino/src/main/java/org/mozilla/javascript/Context.java:504–513  ·  view source on GitHub ↗

Exit a block of code requiring a Context. Calling exit() will remove the association between the current thread and a Context if the prior call to ContextFactory#enterContext() on this thread newly associated a Context with this thread. Once the current thread no longer has an as

()

Source from the content-addressed store, hash-verified

502 * @see ContextFactory#enterContext()
503 */
504 public static void exit() {
505 Context cx = currentContext.get();
506 if (cx == null) {
507 throw new IllegalStateException("Calling Context.exit without previous Context.enter");
508 }
509 if (cx.enterCount < 1) Kit.codeBug();
510 if (--cx.enterCount == 0) {
511 releaseContext(cx);
512 }
513 }
514
515 @Override
516 public void close() {

Callers 15

runMethod · 0.95
getTestCasesMethod · 0.95
tearDownMethod · 0.95
testThisMethod · 0.95
testGeneratorMethod · 0.95
tearDownMethod · 0.95
tearDownClassMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95

Calls 3

codeBugMethod · 0.95
releaseContextMethod · 0.95
getMethod · 0.65

Tested by 15

runMethod · 0.76
getTestCasesMethod · 0.76
tearDownMethod · 0.76
testThisMethod · 0.76
testGeneratorMethod · 0.76
tearDownMethod · 0.76
tearDownClassMethod · 0.76
tearDownMethod · 0.76
tearDownMethod · 0.76
tearDownMethod · 0.76
tearDownMethod · 0.76
tearDownMethod · 0.76