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

Unified Diff: chrome/test/base/module_system_test.cc

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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 | « chrome/test/base/module_system_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/module_system_test.cc
diff --git a/chrome/test/base/module_system_test.cc b/chrome/test/base/module_system_test.cc
index 56024269e7736c3e23ca20ea7ce0c9898aeeaf90..5382fed71756a43e0782be1b4139d5773a7a01f1 100644
--- a/chrome/test/base/module_system_test.cc
+++ b/chrome/test/base/module_system_test.cc
@@ -20,7 +20,7 @@ using extensions::ObjectBackedNativeHandler;
// Native JS functions for doing asserts.
class AssertNatives : public ObjectBackedNativeHandler {
public:
- explicit AssertNatives(v8::Handle<v8::Context> context)
+ explicit AssertNatives(extensions::ChromeV8Context* context)
: ObjectBackedNativeHandler(context),
assertion_made_(false),
failed_(false) {
@@ -87,10 +87,15 @@ class FailsOnException : public ModuleSystem::ExceptionHandler {
ModuleSystemTest::ModuleSystemTest()
: isolate_(v8::Isolate::GetCurrent()),
handle_scope_(isolate_),
- context_(v8::Context::New(isolate_)),
+ context_(
+ new extensions::ChromeV8Context(
+ v8::Context::New(isolate_),
+ reinterpret_cast<WebKit::WebFrame*>(1),
+ NULL,
+ extensions::Feature::UNSPECIFIED_CONTEXT)),
source_map_(new StringSourceMap()),
should_assertions_be_made_(true) {
- context_->Enter();
+ context_->v8_context()->Enter();
assert_natives_ = new AssertNatives(context_.get());
module_system_.reset(new ModuleSystem(context_.get(), source_map_.get()));
module_system_->RegisterNativeHandler("assert", scoped_ptr<NativeHandler>(
@@ -101,7 +106,7 @@ ModuleSystemTest::ModuleSystemTest()
ModuleSystemTest::~ModuleSystemTest() {
module_system_.reset();
- context_->Exit();
+ context_->v8_context()->Exit();
}
void ModuleSystemTest::RegisterModule(const std::string& name,
« no previous file with comments | « chrome/test/base/module_system_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698