Changeset 37891 in webkit for trunk/JavaScriptCore/VM/CodeBlock.cpp
- Timestamp:
- Oct 25, 2008, 12:59:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeBlock.cpp
r37845 r37891 40 40 namespace JSC { 41 41 42 #if !defined(NDEBUG) || ENABLE( SAMPLING_TOOL)42 #if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) 43 43 44 44 static UString escapeQuotes(const UString& str) … … 947 947 } 948 948 949 #endif // !defined(NDEBUG) || ENABLE( SAMPLING_TOOL)949 #endif // !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) 950 950 951 951 CodeBlock::~CodeBlock() … … 1111 1111 int CodeBlock::lineNumberForVPC(const Instruction* vPC) 1112 1112 { 1113 ASSERT(lineInfo.size());1114 1113 unsigned instructionOffset = vPC - instructions.begin(); 1115 1114 ASSERT(instructionOffset < instructions.size()); 1116 1115 1117 1116 if (!lineInfo.size()) 1118 return 1; // Empty function1117 return ownerNode->source().firstLine(); // Empty function 1119 1118 1120 1119 int low = 0; … … 1127 1126 high = mid; 1128 1127 } 1128 1129 if (!low) 1130 return ownerNode->source().firstLine(); 1129 1131 return lineInfo[low - 1].lineNumber; 1130 1132 }
Note:
See TracChangeset
for help on using the changeset viewer.