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

Unified Diff: Source/bindings/core/dart/DartInjectedScript.cpp

Issue 1667603002: Fix compile errors from merge of all dartium changes over the past 4 months. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 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 | « Source/bindings/core/dart/DartController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/dart/DartInjectedScript.cpp
diff --git a/Source/bindings/core/dart/DartInjectedScript.cpp b/Source/bindings/core/dart/DartInjectedScript.cpp
index a4456555b829bd83e8b6d4050654c70991aa0616..750f2aa48d03303f4684ae471cc9e91a983079a6 100644
--- a/Source/bindings/core/dart/DartInjectedScript.cpp
+++ b/Source/bindings/core/dart/DartInjectedScript.cpp
@@ -40,7 +40,8 @@
#include "bindings/core/dart/DartUtilities.h"
#include "bindings/core/dart/V8Converter.h"
#include "bindings/core/v8/ScriptFunctionCall.h"
-#include "bindings/core/v8/V8InjectedScriptHost.h"
+#include "bindings/core/v8/V8DOMWrapper.h"
+#include "bindings/core/v8/inspector/V8InjectedScriptHost.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/JSONParser.h"
#include "platform/JSONValues.h"
@@ -271,17 +272,25 @@ DartInjectedScript::~DartInjectedScript()
}
// Copied from V8injectedScriptManager.
-v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(PassRefPtrWillBeRawPtr<InjectedScriptHost> host, InjectedScriptManager* injectedScriptManager, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
- return V8DOMWrapper::createWrapper(creationContext, &V8InjectedScriptHost::wrapperTypeInfo,
- host->toScriptWrappableBase(), isolate);
+v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(PassRefPtrWillBeRawPtr<InjectedScriptHost> host, InjectedScriptManager* injectedScriptManager, v8::Handle<v8::Context> creationContext, v8::Isolate* isolate)
+{
+ // TODO(jacobr): is this correct.
+ v8::Local<v8::FunctionTemplate> wrapperTemplate = host->wrapperTemplate(isolate);
+ ASSERT(!wrapperTemplate.IsEmpty());
+ if (wrapperTemplate.IsEmpty()) {
+ // Hopefully this isn't needed.
+ wrapperTemplate = V8InjectedScriptHost::createWrapperTemplate(isolate);
+ host->setWrapperTemplate(wrapperTemplate, isolate);
+ }
+
+ return V8InjectedScriptHost::wrap(wrapperTemplate, creationContext, host);
}
Dart_Handle DartInjectedScript::consoleApi()
{
if (!m_consoleApi) {
V8Scope v8scope(DartDOMData::current());
- v8::Local<v8::Object> scriptHostWrapper = createInjectedScriptHostV8Wrapper(m_host, m_injectedScriptManager, m_scriptState->v8ScriptState()->context()->Global(), v8::Isolate::GetCurrent());
+ v8::Local<v8::Object> scriptHostWrapper = createInjectedScriptHostV8Wrapper(m_host, m_injectedScriptManager, m_scriptState->v8ScriptState()->context(), v8::Isolate::GetCurrent());
Dart_Handle host = JsInterop::toDart(scriptHostWrapper, false);
Dart_SetPeer(host, this);
« no previous file with comments | « Source/bindings/core/dart/DartController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698