[gjs] jsapi-util: Don't enter a compartment in gjs_eval_with_scope



commit 586266cd061edab31b9d7e9cf1b1767c29e0ff3e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jan 16 15:51:17 2014 -0500

    jsapi-util: Don't enter a compartment in gjs_eval_with_scope
    
    All of the existing callers are already in a compartment, and we
    shouldn't mandate the global compartment for users of this API.

 gjs/jsapi-util.cpp |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index c9154a9..3b54cb0 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -1290,8 +1290,6 @@ gjs_eval_with_scope(JSContext    *context,
         return JS_FALSE;
     }
 
-    JSAutoCompartment ac(context, JS_GetGlobalObject(context));
-
     if (!object)
         object = JS_NewObject(context, NULL, NULL, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]