💄 get_uv_env() => uv_env().
This commit is contained in:
parent
a1a091d805
commit
3747048218
3 changed files with 4 additions and 4 deletions
|
@ -199,7 +199,7 @@ void NodeBindings::UvRunOnce() {
|
|||
// Enter node context while dealing with uv events, by default the global
|
||||
// env would be used unless user specified another one (this happens for
|
||||
// renderer process, which wraps the uv loop with web page context).
|
||||
node::Environment* env = get_uv_env() ? get_uv_env() : global_env;
|
||||
node::Environment* env = uv_env() ? uv_env() : global_env;
|
||||
v8::Context::Scope context_scope(env->context());
|
||||
|
||||
// Deal with uv events.
|
||||
|
|
|
@ -40,7 +40,7 @@ class NodeBindings {
|
|||
|
||||
// Gets/sets the environment to wrap uv loop.
|
||||
void set_uv_env(node::Environment* env) { uv_env_ = env; }
|
||||
node::Environment* get_uv_env() const { return uv_env_; }
|
||||
node::Environment* uv_env() const { return uv_env_; }
|
||||
|
||||
protected:
|
||||
explicit NodeBindings(bool is_browser);
|
||||
|
|
|
@ -62,7 +62,7 @@ void AtomRendererClient::DidCreateScriptContext(WebKit::WebFrame* frame,
|
|||
web_page_envs_.push_back(env);
|
||||
|
||||
// Make uv loop being wrapped by window context.
|
||||
if (node_bindings_->get_uv_env() == NULL)
|
||||
if (node_bindings_->uv_env() == NULL)
|
||||
node_bindings_->set_uv_env(env);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ void AtomRendererClient::WillReleaseScriptContext(
|
|||
// env->Dispose();
|
||||
|
||||
// Wrap the uv loop with another environment.
|
||||
if (env == node_bindings_->get_uv_env()) {
|
||||
if (env == node_bindings_->uv_env()) {
|
||||
node::Environment* env = web_page_envs_.size() > 0 ? web_page_envs_[0] :
|
||||
NULL;
|
||||
node_bindings_->set_uv_env(env);
|
||||
|
|
Loading…
Reference in a new issue