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

Unified Diff: src/ic.cc

Issue 23601031: Handlify JSReceiver::SetProperty and friends. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. 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 | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 5267af1a27152d6be1dcb754f35a542dfeb04947..992df1b1b0a0f13fb9a209dfde51dd9d5a915fe9 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1670,8 +1670,10 @@ MaybeObject* StoreIC::Store(State state,
JSReceiver::StoreFromKeyed store_mode) {
// Handle proxies.
if (object->IsJSProxy()) {
- return JSReceiver::SetPropertyOrFail(
+ Handle<Object> result = JSReceiver::SetProperty(
Handle<JSReceiver>::cast(object), name, value, NONE, strict_mode);
+ RETURN_IF_EMPTY_HANDLE(isolate(), result);
+ return *result;
}
// If the object is undefined or null it's illegal to try to set any
@@ -1709,8 +1711,10 @@ MaybeObject* StoreIC::Store(State state,
// Observed objects are always modified through the runtime.
if (FLAG_harmony_observation && receiver->map()->is_observed()) {
- return JSReceiver::SetPropertyOrFail(
+ Handle<Object> result = JSReceiver::SetProperty(
receiver, name, value, NONE, strict_mode, store_mode);
+ RETURN_IF_EMPTY_HANDLE(isolate(), result);
+ return *result;
}
// Use specialized code for setting the length of arrays with fast
@@ -1727,8 +1731,10 @@ MaybeObject* StoreIC::Store(State state,
StoreArrayLengthStub(kind(), strict_mode).GetCode(isolate());
set_target(*stub);
TRACE_IC("StoreIC", name, state, *stub);
- return JSReceiver::SetPropertyOrFail(
+ Handle<Object> result = JSReceiver::SetProperty(
receiver, name, value, NONE, strict_mode, store_mode);
+ RETURN_IF_EMPTY_HANDLE(isolate(), result);
+ return *result;
}
if (receiver->IsJSGlobalProxy()) {
@@ -1741,8 +1747,10 @@ MaybeObject* StoreIC::Store(State state,
set_target(*stub);
TRACE_IC("StoreIC", name, state, *stub);
}
- return JSReceiver::SetPropertyOrFail(
+ Handle<Object> result = JSReceiver::SetProperty(
receiver, name, value, NONE, strict_mode, store_mode);
+ RETURN_IF_EMPTY_HANDLE(isolate(), result);
+ return *result;
}
LookupResult lookup(isolate());
@@ -1773,8 +1781,10 @@ MaybeObject* StoreIC::Store(State state,
}
// Set the property.
- return JSReceiver::SetPropertyOrFail(
+ Handle<Object> result = JSReceiver::SetProperty(
receiver, name, value, NONE, strict_mode, store_mode);
+ RETURN_IF_EMPTY_HANDLE(isolate(), result);
+ return *result;
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698