| 82 | std::map<std::string, js::RootedObject*> globals; |
| 83 | |
| 84 | static void ReportException(JSContext *cx) |
| 85 | { |
| 86 | if (JS_IsExceptionPending(cx)) { |
| 87 | if (!JS_ReportPendingException(cx)) { |
| 88 | JS_ClearPendingException(cx); |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | static void executeJSFunctionFromReservedSpot(JSContext *cx, JSObject *obj, |
| 94 | jsval &dataVal, jsval &retval) { |