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

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: . Created 7 years, 7 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
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..090d7f00857aebf1f0507e5e46e22dce11624241 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) {
@@ -88,11 +88,18 @@ ModuleSystemTest::ModuleSystemTest()
: isolate_(v8::Isolate::GetCurrent()),
handle_scope_(isolate_),
context_(v8::Context::New(isolate_)),
+ chrome_v8_context_(
+ new extensions::ChromeV8Context(
+ context_.get(),
+ reinterpret_cast<WebKit::WebFrame*>(1),
+ NULL,
+ extensions::Feature::BLESSED_EXTENSION_CONTEXT)),
not at google - send to devlin 2013/05/29 15:55:13 let's make it an undefined context type, I want to
marja 2013/05/29 16:56:33 On 2013/05/29 15:55:13, kalman wrote: > let's make
source_map_(new StringSourceMap()),
should_assertions_be_made_(true) {
context_->Enter();
- assert_natives_ = new AssertNatives(context_.get());
- module_system_.reset(new ModuleSystem(context_.get(), source_map_.get()));
+ assert_natives_ = new AssertNatives(chrome_v8_context_.get());
+ module_system_.reset(
+ new ModuleSystem(chrome_v8_context_.get(), source_map_.get()));
module_system_->RegisterNativeHandler("assert", scoped_ptr<NativeHandler>(
assert_natives_));
module_system_->SetExceptionHandlerForTest(
« chrome/test/base/module_system_test.h ('K') | « 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