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

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

Issue 2348783002: [AST] Add method to concatenate AstRawStrings (Closed)
Patch Set: use ConcatString Created 4 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/runtime/runtime.h ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('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 5448159513bda41508a1c8cd1f72e859be74197a..62746683b1bf3378ccddaeefd2bf0c2f4116bb16 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -75,6 +75,20 @@ RUNTIME_FUNCTION(Runtime_ThrowIfStaticPrototype) {
return *name;
}
+RUNTIME_FUNCTION(Runtime_ThrowIfMissingPrivateField) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 2);
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
+ if (!object->IsJSReceiver() ||
+ !JSReceiver::HasOwnProperty(Handle<JSReceiver>::cast(object), name)
+ .FromMaybe(false)) { // TODO(bakkot) check this doesn't trigger a
+ // proxy trap
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewTypeError(MessageTemplate::kMissingPrivateField));
+ }
+ return *object;
+}
RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) {
DCHECK(args.length() == 0);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698