Use the new way of reporting exception in node context.
More on this can be found at:
3c0fc7ad9f
This commit is contained in:
parent
0bab9a9d84
commit
f3a8a0741c
3 changed files with 20 additions and 15 deletions
|
@ -8,12 +8,20 @@
|
|||
#include "renderer/atom_render_view_observer.h"
|
||||
#include "vendor/node/src/node_internals.h"
|
||||
|
||||
namespace webkit_atom {
|
||||
extern void SetNodeContext(v8::Persistent<v8::Context> context);
|
||||
namespace webkit {
|
||||
extern void SetGetNodeContext(v8::Handle<v8::Context> (*)());
|
||||
}
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
||||
v8::Handle<v8::Context> GetNodeContext() {
|
||||
return node::g_context;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
AtomRendererClient::AtomRendererClient()
|
||||
: node_bindings_(NodeBindings::Create(false)) {
|
||||
}
|
||||
|
@ -25,7 +33,7 @@ void AtomRendererClient::RenderThreadStarted() {
|
|||
node_bindings_->Initialize();
|
||||
|
||||
// Interact with dirty workarounds of extra node context in WebKit.
|
||||
webkit_atom::SetNodeContext(node::g_context);
|
||||
webkit::SetGetNodeContext(GetNodeContext);
|
||||
|
||||
node_bindings_->Load();
|
||||
node_bindings_->PrepareMessageLoop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue