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

Unified Diff: src/objects-inl.h

Issue 300773002: Do not break in native code (including non-builtin debugger code). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/objects.h ('k') | test/mjsunit/debug-break-native.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 31ebbb18c8a42bf0399208099e20ac7f910c2d8c..58c9c966b088205b2e6a2013d55f9485bc1d3c8b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5418,6 +5418,15 @@ bool JSFunction::IsBuiltin() {
}
+bool JSFunction::IsNative() {
+ Object* script = shared()->script();
+ bool native = script->IsScript() &&
+ Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
+ ASSERT(!IsBuiltin() || native); // All builtins are also native.
+ return native;
+}
+
+
bool JSFunction::NeedsArgumentsAdaption() {
return shared()->formal_parameter_count() !=
SharedFunctionInfo::kDontAdaptArgumentsSentinel;
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/debug-break-native.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698