Changeset 39697 in webkit for trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp
- Timestamp:
- Jan 7, 2009, 5:46:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/ExceptionHelpers.cpp
r39670 r39697 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 93 93 int endOffset = 0; 94 94 int divotPoint = 0; 95 int line = codeBlock->expressionRangeForBytecodeOffset( bytecodeOffset, divotPoint, startOffset, endOffset);95 int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, 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->expressionRangeForBytecodeOffset( bytecodeOffset, divotPoint, startOffset, endOffset);160 int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, 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->expressionRangeForBytecodeOffset( bytecodeOffset, divotPoint, startOffset, endOffset);174 int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, 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->expressionRangeForBytecodeOffset( bytecodeOffset, divotPoint, startOffset, endOffset);195 int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, 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()); … … 213 213 // thrown by these instances op_get_by_id need to reflect this. 214 214 OpcodeID followingOpcodeID; 215 if (codeBlock->getByIdExceptionInfoForBytecodeOffset( bytecodeOffset, followingOpcodeID)) {215 if (codeBlock->getByIdExceptionInfoForBytecodeOffset(exec, bytecodeOffset, followingOpcodeID)) { 216 216 ASSERT(followingOpcodeID == op_construct || followingOpcodeID == op_instanceof); 217 217 if (followingOpcodeID == op_construct) … … 223 223 int endOffset = 0; 224 224 int divotPoint = 0; 225 int line = codeBlock->expressionRangeForBytecodeOffset( bytecodeOffset, divotPoint, startOffset, endOffset);225 int line = codeBlock->expressionRangeForBytecodeOffset(exec, bytecodeOffset, divotPoint, startOffset, endOffset); 226 226 UString errorMessage = createErrorMessage(exec, codeBlock, line, divotPoint - startOffset, divotPoint, error->isNull() ? jsNull() : jsUndefined(), "not an object"); 227 227 JSObject* exception = Error::create(exec, TypeError, errorMessage, line, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL());
Note:
See TracChangeset
for help on using the changeset viewer.