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

Unified Diff: content/renderer/v8_value_converter_impl.cc

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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 | « content/renderer/v8_value_converter_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/v8_value_converter_impl.cc
diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc
index 218624aff068384848b63d527411596218c08cd3..b0762ef11f1db00778796f391aa0f4163fbf5a22 100644
--- a/content/renderer/v8_value_converter_impl.cc
+++ b/content/renderer/v8_value_converter_impl.cc
@@ -26,7 +26,7 @@ V8ValueConverterImpl::V8ValueConverterImpl()
}
v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Value(
- Value* value, v8::Handle<v8::Context> context) const {
+ const Value* value, v8::Handle<v8::Context> context) const {
v8::Context::Scope context_scope(context);
v8::HandleScope handle_scope;
return handle_scope.Close(ToV8ValueImpl(value));
@@ -40,7 +40,8 @@ Value* V8ValueConverterImpl::FromV8Value(
return FromV8ValueImpl(val);
}
-v8::Handle<v8::Value> V8ValueConverterImpl::ToV8ValueImpl(Value* value) const {
+v8::Handle<v8::Value> V8ValueConverterImpl::ToV8ValueImpl(
+ const Value* value) const {
CHECK(value);
switch (value->GetType()) {
case Value::TYPE_NULL:
@@ -71,10 +72,10 @@ v8::Handle<v8::Value> V8ValueConverterImpl::ToV8ValueImpl(Value* value) const {
}
case Value::TYPE_LIST:
- return ToV8Array(static_cast<ListValue*>(value));
+ return ToV8Array(static_cast<const ListValue*>(value));
case Value::TYPE_DICTIONARY:
- return ToV8Object(static_cast<DictionaryValue*>(value));
+ return ToV8Object(static_cast<const DictionaryValue*>(value));
default:
LOG(ERROR) << "Unexpected value type: " << value->GetType();
@@ -82,7 +83,8 @@ v8::Handle<v8::Value> V8ValueConverterImpl::ToV8ValueImpl(Value* value) const {
}
}
-v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Array(ListValue* val) const {
+v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Array(
+ const ListValue* val) const {
v8::Handle<v8::Array> result(v8::Array::New(val->GetSize()));
for (size_t i = 0; i < val->GetSize(); ++i) {
@@ -102,7 +104,7 @@ v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Array(ListValue* val) const {
}
v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Object(
- DictionaryValue* val) const {
+ const DictionaryValue* val) const {
v8::Handle<v8::Object> result(v8::Object::New());
for (DictionaryValue::key_iterator iter = val->begin_keys();
« no previous file with comments | « content/renderer/v8_value_converter_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698