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

Unified Diff: gin/modules/module_registry.cc

Issue 60613003: Add a dependency from Gin to base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « gin/modules/module_registry.h ('k') | gin/per_context_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/modules/module_registry.cc
diff --git a/gin/modules/module_registry.cc b/gin/modules/module_registry.cc
index 78a102c0a6da5186e83987ecef41716181d4c8f0..aad2135b0e1114aa634366d7da39e91831946bfe 100644
--- a/gin/modules/module_registry.cc
+++ b/gin/modules/module_registry.cc
@@ -4,9 +4,9 @@
#include "gin/modules/module_registry.h"
-#include <assert.h>
#include <string>
#include <vector>
+#include "base/logging.h"
#include "gin/arguments.h"
#include "gin/converter.h"
#include "gin/per_isolate_data.h"
@@ -104,7 +104,7 @@ void ModuleRegistry::RegisterGlobals(v8::Isolate* isolate,
void ModuleRegistry::AddBuiltinModule(Isolate* isolate,
const std::string& id,
Handle<ObjectTemplate> templ) {
- assert(!id.empty());
+ DCHECK(!id.empty());
Handle<v8::Object> modules = v8::Local<v8::Object>::New(isolate, modules_);
modules->Set(StringToV8(isolate, id), templ->NewInstance());
}
@@ -120,7 +120,7 @@ ModuleRegistry* ModuleRegistry::From(Handle<v8::Context> context) {
return NULL;
ModuleRegistry* registry = new ModuleRegistry(isolate);
context->Global()->SetHiddenValue(key, v8::External::New(registry));
- data->AddSupplement(registry);
+ data->AddSupplement(scoped_ptr<ContextSupplement>(registry));
return registry;
}
return static_cast<ModuleRegistry*>(external->Value());
« no previous file with comments | « gin/modules/module_registry.h ('k') | gin/per_context_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698