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

Unified Diff: chrome/renderer/extensions/set_icon_natives.cc

Issue 98543004: Remove usage of deprecated V8 APIs from c/r/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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/extensions/send_request_natives.cc ('k') | chrome/renderer/extensions/unsafe_persistent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/set_icon_natives.cc
diff --git a/chrome/renderer/extensions/set_icon_natives.cc b/chrome/renderer/extensions/set_icon_natives.cc
index ddfd4fdeacd36d16b8cb94dfa3b879d9542a2e6b..279e9d08d1925b99224df3f9b0c606be88bf2dd5 100644
--- a/chrome/renderer/extensions/set_icon_natives.cc
+++ b/chrome/renderer/extensions/set_icon_natives.cc
@@ -45,7 +45,7 @@ bool SetIconNatives::ConvertImageDataToBitmapValue(
image_data->Get(v8::String::NewFromUtf8(isolate, "height"))->Int32Value();
if (width <= 0 || height <= 0) {
- v8::ThrowException(v8::Exception::Error(
+ isolate->ThrowException(v8::Exception::Error(
v8::String::NewFromUtf8(isolate, kInvalidDimensions)));
return false;
}
@@ -54,7 +54,7 @@ bool SetIconNatives::ConvertImageDataToBitmapValue(
// without overflowing below.
int max_width = (std::numeric_limits<int>::max() / 4) / height;
if (width > max_width) {
- v8::ThrowException(v8::Exception::Error(
+ isolate->ThrowException(v8::Exception::Error(
v8::String::NewFromUtf8(isolate, kInvalidDimensions)));
return false;
}
@@ -62,7 +62,7 @@ bool SetIconNatives::ConvertImageDataToBitmapValue(
int data_length =
data->Get(v8::String::NewFromUtf8(isolate, "length"))->Int32Value();
if (data_length != 4 * width * height) {
- v8::ThrowException(
+ isolate->ThrowException(
v8::Exception::Error(v8::String::NewFromUtf8(isolate, kInvalidData)));
return false;
}
@@ -70,7 +70,7 @@ bool SetIconNatives::ConvertImageDataToBitmapValue(
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
if (!bitmap.allocPixels()) {
- v8::ThrowException(
+ isolate->ThrowException(
v8::Exception::Error(v8::String::NewFromUtf8(isolate, kNoMemory)));
return false;
}
@@ -144,7 +144,7 @@ void SetIconNatives::SetIconCommon(
ListValue list_value;
list_value.Append(dict);
- std::string name = *v8::String::AsciiValue(args[0]);
+ std::string name = *v8::String::Utf8Value(args[0]);
int request_id = args[2]->Int32Value();
bool has_callback = args[3]->BooleanValue();
bool for_io_thread = args[4]->BooleanValue();
« no previous file with comments | « chrome/renderer/extensions/send_request_natives.cc ('k') | chrome/renderer/extensions/unsafe_persistent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698