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

Unified Diff: src/ic/ic.cc

Issue 1587073003: Array length reduction should throw in strict mode if it can't delete an element. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing for relanding Created 4 years, 11 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 | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index ca0913747426868db813544173d2eb0e87286669..5cbf939c94de15782f07c3910c83e8954fa662fb 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -21,6 +21,7 @@
#include "src/macro-assembler.h"
#include "src/prototype.h"
#include "src/runtime/runtime.h"
+#include "src/runtime/runtime-utils.h"
namespace v8 {
namespace internal {
@@ -1747,7 +1748,8 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup,
break;
}
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder);
- return compiler.CompileStoreCallback(receiver, lookup->name(), info);
+ return compiler.CompileStoreCallback(receiver, lookup->name(), info,
+ language_mode());
} else if (accessors->IsAccessorPair()) {
Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(),
isolate());
@@ -2813,6 +2815,7 @@ RUNTIME_FUNCTION(Runtime_StoreCallbackProperty) {
Handle<HeapObject> callback_or_cell = args.at<HeapObject>(2);
Handle<Name> name = args.at<Name>(3);
Handle<Object> value = args.at<Object>(4);
+ CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 5);
HandleScope scope(isolate);
Handle<AccessorInfo> callback(
@@ -2828,8 +2831,10 @@ RUNTIME_FUNCTION(Runtime_StoreCallbackProperty) {
DCHECK(fun != NULL);
LOG(isolate, ApiNamedPropertyAccess("store", *receiver, *name));
+ Object::ShouldThrow should_throw =
+ is_sloppy(language_mode) ? Object::DONT_THROW : Object::THROW_ON_ERROR;
PropertyCallbackArguments custom_args(isolate, callback->data(), *receiver,
- *holder);
+ *holder, should_throw);
custom_args.Call(fun, v8::Utils::ToLocal(name), v8::Utils::ToLocal(value));
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
return *value;
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698