]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - inspector/JSGlobalObjectInspectorController.cpp
JavaScriptCore-7600.1.4.15.12.tar.gz
[apple/javascriptcore.git] / inspector / JSGlobalObjectInspectorController.cpp
index 4b8301ad2a6d81bbd487f1dc4d89968543d08f86..ebdd1809625bdc85695bfe2e95c6c8a3dbc235a4 100644 (file)
 #include <dlfcn.h>
 #include <execinfo.h>
 
 #include <dlfcn.h>
 #include <execinfo.h>
 
+#if ENABLE(REMOTE_INSPECTOR)
+#include "JSGlobalObjectDebuggable.h"
+#include "RemoteInspector.h"
+#endif
+
 using namespace JSC;
 
 namespace Inspector {
 using namespace JSC;
 
 namespace Inspector {
@@ -175,6 +180,19 @@ ConsoleClient* JSGlobalObjectInspectorController::consoleClient() const
     return m_consoleClient.get();
 }
 
     return m_consoleClient.get();
 }
 
+bool JSGlobalObjectInspectorController::developerExtrasEnabled() const
+{
+#if ENABLE(REMOTE_INSPECTOR)
+    if (!RemoteInspector::shared().enabled())
+        return false;
+
+    if (!m_globalObject.inspectorDebuggable().remoteDebuggingAllowed())
+        return false;
+#endif
+
+    return true;
+}
+
 InspectorFunctionCallHandler JSGlobalObjectInspectorController::functionCallHandler() const
 {
     return JSC::call;
 InspectorFunctionCallHandler JSGlobalObjectInspectorController::functionCallHandler() const
 {
     return JSC::call;