:lipstick: get_uv_env() => uv_env().
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jan 2014 08:29:38 +0000 (16:29 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jan 2014 08:29:38 +0000 (16:29 +0800)
common/node_bindings.cc
common/node_bindings.h
renderer/atom_renderer_client.cc

index 247ca07..e36ba9b 100644 (file)
@@ -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.
index 7370495..7f61ed4 100644 (file)
@@ -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);
index 770a449..176ca28 100644 (file)
@@ -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);