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

Unified Diff: src/harmony-typedarray.js

Issue 1116003005: Remove GetDefaultReceiver, pass in undefined to sloppy-mode functions instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make sure it does TO_OBJECT Created 5 years, 8 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/harmony-array.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-typedarray.js
diff --git a/src/harmony-typedarray.js b/src/harmony-typedarray.js
index 7fc01cb801a9e6470899c042a9f09ce9a6c3992d..5c735fd9576b5c54cc14063a9b2bb24554290825 100644
--- a/src/harmony-typedarray.js
+++ b/src/harmony-typedarray.js
@@ -41,9 +41,9 @@ function NAMEForEach(f /* thisArg */) { // length == 1
}
var needs_wrapper = false;
- if (IS_NULL_OR_UNDEFINED(receiver)) {
- receiver = %GetDefaultReceiver(f) || receiver;
- } else {
+ if (IS_NULL(receiver)) {
+ if (%IsSloppyModeFunction(mapfn)) receiver = UNDEFINED;
+ } else if (!IS_UNDEFINED(receiver)) {
needs_wrapper = SHOULD_CREATE_WRAPPER(f, receiver);
}
« no previous file with comments | « src/harmony-array.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698