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

Unified Diff: src/objects-inl.h

Issue 363893003: Stack traces exposed to Javascript should omit extensions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/cctest/test-api.cc » ('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 50c9f3c28d49f40ff5236cfe93c2dd4db21fe800..95b257229972cf9bbb177f649bc6b56654549f81 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5657,7 +5657,7 @@ bool JSFunction::IsBuiltin() {
}
-bool JSFunction::IsNative() {
+bool JSFunction::IsFromNativeScript() {
Object* script = shared()->script();
bool native = script->IsScript() &&
Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
@@ -5666,6 +5666,13 @@ bool JSFunction::IsNative() {
}
+bool JSFunction::IsFromExtensionScript() {
+ Object* script = shared()->script();
+ return script->IsScript() &&
+ Script::cast(script)->type()->value() == Script::TYPE_EXTENSION;
+}
+
+
bool JSFunction::NeedsArgumentsAdaption() {
return shared()->formal_parameter_count() !=
SharedFunctionInfo::kDontAdaptArgumentsSentinel;
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698