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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 28973003: Test for OscillatorNode.type=. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 21cbd89ddd487aeb9b3b721cd8baea02d0b63951..0eff97cecbf22e456798769baa7f3165735837ab 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -264,6 +264,9 @@ bool Api::StringGetPeerHelper(Dart_NativeArguments args,
NoGCScope no_gc_scope;
NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
RawObject* raw_obj = arguments->NativeArgAt(arg_index);
+ if (!raw_obj->IsHeapObject()) {
+ return false;
+ }
intptr_t cid = raw_obj->GetClassId();
if (cid == kExternalOneByteStringCid) {
RawExternalOneByteString* raw_string =
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698