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

Unified Diff: src/runtime/runtime-classes.cc

Issue 896643003: Class methods should be non enumerable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 5 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
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index 00567d432330e0e329e1ffd6b15b0c690f7c103d..7e512d4fbf3f31c4a1843dc17b619e91650d0f37 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -159,11 +159,12 @@ RUNTIME_FUNCTION(Runtime_DefineClassMethod) {
uint32_t index;
if (name->AsArrayIndex(&index)) {
RETURN_FAILURE_ON_EXCEPTION(
- isolate, JSObject::SetOwnElement(object, index, function, STRICT));
+ isolate,
+ JSObject::SetOwnElement(object, index, function, DONT_ENUM, STRICT));
} else {
RETURN_FAILURE_ON_EXCEPTION(
- isolate,
- JSObject::SetOwnPropertyIgnoreAttributes(object, name, function, NONE));
+ isolate, JSObject::SetOwnPropertyIgnoreAttributes(object, name,
+ function, DONT_ENUM));
}
return isolate->heap()->undefined_value();
}

Powered by Google App Engine
This is Rietveld 408576698