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

Unified Diff: src/objects.h

Issue 1230793002: [es6] silence access-check failure for well-known symbol properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make well-known symbols behave magically Created 5 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 | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index c04488240d8d1d6af1f4992514747a9231c4f859..4e67afe863249ed46593425ba5f1454ca84ac48d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1211,6 +1211,11 @@ class Object {
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
LookupIterator* it, LanguageMode language_mode = SLOPPY);
+ // GetProperty, but allows custom behaviour when an access check fails
+ MUST_USE_RESULT static MaybeHandle<Object> GetPropertyEx(
+ LookupIterator* it, bool& access_check_failed,
+ LanguageMode language_mode = SLOPPY);
Toon Verwaest 2015/10/02 08:05:27 This declaration can now be dropped.
caitp (gmail) 2015/10/02 10:01:15 Acknowledged.
caitp (gmail) 2015/10/02 10:41:56 Done.
+
// Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5.
MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
Handle<Object> object, Handle<Name> name, Handle<Object> value,
@@ -8375,6 +8380,11 @@ class Symbol: public Name {
// be used to designate own properties of objects.
DECL_BOOLEAN_ACCESSORS(is_private)
+ // [is_well_known_symbol]: Whether this is a spec-defined well-known symbol,
+ // or not. Well-known symbols do not throw when an access check fails during
+ // a load.
+ DECL_BOOLEAN_ACCESSORS(is_well_known_symbol)
+
DECLARE_CAST(Symbol)
// Dispatched behavior.
@@ -8392,6 +8402,7 @@ class Symbol: public Name {
private:
static const int kPrivateBit = 0;
+ static const int kWellKnownSymbolBit = 1;
const char* PrivateSymbolToName() const;
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698