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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2618693004: Mojo JS bindings: make sure that console.log() could be used in the bindings. (Closed)
Patch Set: merge & resolve Created 3 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 | extensions/renderer/api_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 120d55863df289c3d50cb2dcb642b2302a31b5b3..9c3cae880e57282ee0067d3ece468c2cda984566 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -141,6 +141,7 @@
#include "content/renderer/web_frame_utils.h"
#include "content/renderer/web_ui_extension.h"
#include "crypto/sha2.h"
+#include "gin/modules/console.h"
#include "gin/modules/module_registry.h"
#include "media/audio/audio_output_device.h"
#include "media/base/audio_renderer_mixer_input.h"
@@ -2621,6 +2622,9 @@ void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable(
return;
v8::HandleScope handle_scope(isolate);
+
+ registry->AddBuiltinModule(isolate, gin::Console::kModuleName,
+ gin::Console::GetModule(isolate));
registry->AddBuiltinModule(isolate, mojo::edk::js::Core::kModuleName,
mojo::edk::js::Core::GetModule(isolate));
registry->AddBuiltinModule(isolate, mojo::edk::js::Support::kModuleName,
« no previous file with comments | « no previous file | extensions/renderer/api_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698