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

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

Issue 12313142: Revert 184837 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/renderer/resources/renderer_resources.grd ('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
===================================================================
--- chrome/test/base/module_system_test.cc (revision 184858)
+++ chrome/test/base/module_system_test.cc (working copy)
@@ -7,7 +7,7 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_piece.h"
-#include "chrome/renderer/extensions/object_backed_native_handler.h"
+#include "chrome/renderer/extensions/native_handler.h"
#include "ui/base/resource/resource_bundle.h"
#include <map>
@@ -15,13 +15,12 @@
using extensions::ModuleSystem;
using extensions::NativeHandler;
-using extensions::ObjectBackedNativeHandler;
// Native JS functions for doing asserts.
-class AssertNatives : public ObjectBackedNativeHandler {
+class AssertNatives : public NativeHandler {
public:
- explicit AssertNatives(v8::Handle<v8::Context> context)
- : ObjectBackedNativeHandler(context),
+ explicit AssertNatives(v8::Isolate* isolate)
+ : NativeHandler(isolate),
assertion_made_(false),
failed_(false) {
RouteFunction("AssertTrue", base::Bind(&AssertNatives::AssertTrue,
@@ -89,7 +88,7 @@
source_map_(new StringSourceMap()),
should_assertions_be_made_(true) {
context_->Enter();
- assert_natives_ = new AssertNatives(context_);
+ assert_natives_ = new AssertNatives(context_->GetIsolate());
module_system_.reset(new ModuleSystem(context_, source_map_.get()));
module_system_->RegisterNativeHandler("assert", scoped_ptr<NativeHandler>(
assert_natives_));
@@ -100,7 +99,7 @@
ModuleSystemTest::~ModuleSystemTest() {
module_system_.reset();
context_->Exit();
- context_.Dispose();
+ context_.Dispose(context_->GetIsolate());
}
void ModuleSystemTest::RegisterModule(const std::string& name,
« no previous file with comments | « chrome/renderer/resources/renderer_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698