Changeset 39252 in webkit for trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp
- Timestamp:
- Dec 12, 2008, 1:31:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp
r39070 r39252 93 93 int endOffset = 0; 94 94 int divotPoint = 0; 95 int line = codeBlock->expressionRangeFor VPC(vPC, divotPoint, startOffset, endOffset);95 int line = codeBlock->expressionRangeForBytecodeOffset(vPC - codeBlock->instructions().begin(), divotPoint, startOffset, endOffset); 96 96 UString message = "Can't find variable: "; 97 97 message.append(ident.ustring()); … … 158 158 int endOffset = 0; 159 159 int divotPoint = 0; 160 int line = codeBlock->expressionRangeFor VPC(vPC, divotPoint, startOffset, endOffset);160 int line = codeBlock->expressionRangeForBytecodeOffset(vPC - codeBlock->instructions().begin(), divotPoint, startOffset, endOffset); 161 161 UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint, divotPoint + endOffset, value, message); 162 162 JSObject* exception = Error::create(exec, TypeError, errorMessage, line, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()); … … 172 172 int endOffset = 0; 173 173 int divotPoint = 0; 174 int line = codeBlock->expressionRangeFor VPC(vPC, divotPoint, startOffset, endOffset);174 int line = codeBlock->expressionRangeForBytecodeOffset(vPC - codeBlock->instructions().begin(), divotPoint, startOffset, endOffset); 175 175 176 176 // We're in a "new" expression, so we need to skip over the "new.." part … … 193 193 int endOffset = 0; 194 194 int divotPoint = 0; 195 int line = codeBlock->expressionRangeFor VPC(vPC, divotPoint, startOffset, endOffset);195 int line = codeBlock->expressionRangeForBytecodeOffset(vPC - codeBlock->instructions().begin(), divotPoint, startOffset, endOffset); 196 196 UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint - startOffset, divotPoint, value, "not a function"); 197 197 JSObject* exception = Error::create(exec, TypeError, errorMessage, line, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()); … … 217 217 int endOffset = 0; 218 218 int divotPoint = 0; 219 int line = codeBlock->expressionRangeFor VPC(vPC, divotPoint, startOffset, endOffset);219 int line = codeBlock->expressionRangeForBytecodeOffset(vPC - codeBlock->instructions().begin(), divotPoint, startOffset, endOffset); 220 220 UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint - startOffset, divotPoint, error->isNull() ? jsNull() : jsUndefined(), "not an object"); 221 221 JSObject* exception = Error::create(exec, TypeError, errorMessage, line, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL());
Note:
See TracChangeset
for help on using the changeset viewer.