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

Unified Diff: trunk/src/chrome/renderer/extensions/activity_log_converter_strategy_unittest.cc

Issue 23724028: Revert 222102 "Remove unsafe access hacks from ScopedPersistent." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | « no previous file | trunk/src/chrome/renderer/extensions/chrome_v8_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/renderer/extensions/activity_log_converter_strategy_unittest.cc
===================================================================
--- trunk/src/chrome/renderer/extensions/activity_log_converter_strategy_unittest.cc (revision 222150)
+++ trunk/src/chrome/renderer/extensions/activity_log_converter_strategy_unittest.cc (working copy)
@@ -19,7 +19,7 @@
: isolate_(v8::Isolate::GetCurrent())
, handle_scope_(isolate_)
, context_(v8::Context::New(isolate_))
- , context_scope_(context()) {
+ , context_scope_(context_.get()) {
}
protected:
@@ -32,7 +32,7 @@
testing::AssertionResult VerifyNull(v8::Local<v8::Value> v8_value) {
scoped_ptr<base::Value> value(
- converter_->FromV8Value(v8_value, context()));
+ converter_->FromV8Value(v8_value, context_.get()));
if (value->IsType(base::Value::TYPE_NULL))
return testing::AssertionSuccess();
return testing::AssertionFailure();
@@ -42,7 +42,7 @@
bool expected) {
bool out;
scoped_ptr<base::Value> value(
- converter_->FromV8Value(v8_value, context()));
+ converter_->FromV8Value(v8_value, context_.get()));
if (value->IsType(base::Value::TYPE_BOOLEAN)
&& value->GetAsBoolean(&out)
&& out == expected)
@@ -54,7 +54,7 @@
int expected) {
int out;
scoped_ptr<base::Value> value(
- converter_->FromV8Value(v8_value, context()));
+ converter_->FromV8Value(v8_value, context_.get()));
if (value->IsType(base::Value::TYPE_INTEGER)
&& value->GetAsInteger(&out)
&& out == expected)
@@ -66,7 +66,7 @@
double expected) {
double out;
scoped_ptr<base::Value> value(
- converter_->FromV8Value(v8_value, context()));
+ converter_->FromV8Value(v8_value, context_.get()));
if (value->IsType(base::Value::TYPE_DOUBLE)
&& value->GetAsDouble(&out)
&& out == expected)
@@ -78,7 +78,7 @@
const std::string& expected) {
std::string out;
scoped_ptr<base::Value> value(
- converter_->FromV8Value(v8_value, context()));
+ converter_->FromV8Value(v8_value, context_.get()));
if (value->IsType(base::Value::TYPE_STRING)
&& value->GetAsString(&out)
&& out == expected)
@@ -86,10 +86,6 @@
return testing::AssertionFailure();
}
- v8::Handle<v8::Context> context() const {
- return context_.NewHandle(isolate_);
- }
-
v8::Isolate* isolate_;
v8::HandleScope handle_scope_;
ScopedPersistent<v8::Context> context_;
@@ -159,3 +155,4 @@
}
} // namespace extensions
+
« no previous file with comments | « no previous file | trunk/src/chrome/renderer/extensions/chrome_v8_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698