Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Unified Diff: bindings/js/JSInjectedScriptHostCustom.cpp

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bindings/js/ScriptController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bindings/js/JSInjectedScriptHostCustom.cpp
===================================================================
--- bindings/js/JSInjectedScriptHostCustom.cpp (revision 53180)
+++ bindings/js/JSInjectedScriptHostCustom.cpp (working copy)
@@ -47,8 +47,6 @@
#include "InspectorController.h"
#include "InspectorResource.h"
#include "JSDOMWindow.h"
-#include "JSInspectedObjectWrapper.h"
-#include "JSInspectorCallbackWrapper.h"
#include "JSNode.h"
#include "JSRange.h"
#include "Node.h"
@@ -112,29 +110,10 @@
Database* database = impl()->databaseForId(args.at(0).toInt32(exec));
if (!database)
return jsUndefined();
- // Could use currentWorld(exec) ... but which exec! The following mixed use of exec & inspectedWindow->globalExec() scares me!
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, database));
+ return toJS(exec, database);
}
#endif
-JSValue JSInjectedScriptHost::inspectedWindow(ExecState*, const ArgList&)
-{
- InspectorController* ic = impl()->inspectorController();
- if (!ic)
- return jsUndefined();
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), inspectedWindow);
-}
-
-JSValue JSInjectedScriptHost::wrapCallback(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 1)
- return jsUndefined();
-
- return JSInspectorCallbackWrapper::wrap(exec, args.at(0));
-}
-
#if ENABLE(JAVASCRIPT_DEBUGGER)
JSValue JSInjectedScriptHost::currentCallFrame(ExecState* exec, const ArgList&)
@@ -143,11 +122,8 @@
if (!callFrame || !callFrame->isValid())
return jsUndefined();
- // FIXME: I am not sure if this is actually needed. Can we just use exec?
- ExecState* globalExec = callFrame->scopeChain()->globalObject->globalExec();
-
JSLock lock(SilenceAssertionsOnly);
- return JSInspectedObjectWrapper::wrap(globalExec, toJS(exec, callFrame));
+ return toJS(exec, callFrame);
}
#endif
@@ -166,36 +142,15 @@
return jsUndefined();
JSLock lock(SilenceAssertionsOnly);
- JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame(), debuggerWorld());
- return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, deprecatedGlobalObjectForPrototype(inspectedWindow->globalExec()), node));
+ return toJS(exec, node);
}
-JSValue JSInjectedScriptHost::wrapObject(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 2)
- return jsUndefined();
-
- return impl()->wrapObject(ScriptValue(args.at(0)), args.at(1).toString(exec)).jsValue();
-}
-
-JSValue JSInjectedScriptHost::unwrapObject(ExecState* exec, const ArgList& args)
-{
- if (args.size() < 1)
- return jsUndefined();
-
- return impl()->unwrapObject(args.at(0).toString(exec)).jsValue();
-}
-
JSValue JSInjectedScriptHost::pushNodePathToFrontend(ExecState* exec, const ArgList& args)
{
if (args.size() < 3)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Node* node = toNode(wrapper->unwrappedObject());
+ Node* node = toNode(args.at(0));
if (!node)
return jsUndefined();
@@ -210,11 +165,7 @@
if (args.size() < 1)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Database* database = toDatabase(wrapper->unwrappedObject());
+ Database* database = toDatabase(args.at(0));
if (database)
impl()->selectDatabase(database);
return jsUndefined();
@@ -230,11 +181,7 @@
if (!ic)
return jsUndefined();
- JSQuarantinedObjectWrapper* wrapper = JSQuarantinedObjectWrapper::asWrapper(args.at(0));
- if (!wrapper)
- return jsUndefined();
-
- Storage* storage = toStorage(wrapper->unwrappedObject());
+ Storage* storage = toStorage(args.at(0));
if (storage)
impl()->selectDOMStorage(storage);
return jsUndefined();
« no previous file with comments | « no previous file | bindings/js/ScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698