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

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: Use LanguageMode Created 5 years, 10 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/runtime/runtime.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index e4a29058c2b2ff1063875956dd742f4307b5f5e2..8a207a8eabcea60d5b12d844e1f97199495af936 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -166,11 +166,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();
}
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698