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

Unified Diff: src/frames-inl.h

Issue 62146: Add name inference for anonymous functions to facilitate debugging and profiling of JS code. (Closed)
Patch Set: updated v8_base_arm project Created 11 years, 8 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/frames-ia32.cc ('k') | src/func-name-inferrer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames-inl.h
diff --git a/src/frames-inl.h b/src/frames-inl.h
index cb03e2fd7fb25ac410e7e837dbf478c71ec28bb0..07c8e4ede55c7b9f39845f44aa4d50087cecf649 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -169,6 +169,19 @@ inline bool JavaScriptFrame::has_adapted_arguments() const {
}
+inline bool JavaScriptFrame::is_at_function() const {
+ Object* result = function_slot_object();
+ // Verify that frame points at correct JS function object.
+ // We are verifying that function object address and
+ // the underlying map object address are valid, and that
+ // function is really a function.
+ return Heap::Contains(reinterpret_cast<Address>(result)) &&
+ result->IsHeapObject() &&
+ Heap::Contains(HeapObject::cast(result)->map()) &&
+ result->IsJSFunction();
+}
+
+
inline Object* JavaScriptFrame::function() const {
Object* result = function_slot_object();
ASSERT(result->IsJSFunction());
« no previous file with comments | « src/frames-ia32.cc ('k') | src/func-name-inferrer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698