| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 script.startLine = sourceProvider->startPosition().m_line.zeroBasedInt(); | 235 script.startLine = sourceProvider->startPosition().m_line.zeroBasedInt(); |
| 236 script.startColumn = sourceProvider->startPosition().m_column.zeroBasedInt()
; | 236 script.startColumn = sourceProvider->startPosition().m_column.zeroBasedInt()
; |
| 237 script.isContentScript = isContentScript; | 237 script.isContentScript = isContentScript; |
| 238 | 238 |
| 239 if (script.url.isEmpty()) | 239 if (script.url.isEmpty()) |
| 240 script.url = ContentSearchUtils::findSourceURL(script.source); | 240 script.url = ContentSearchUtils::findSourceURL(script.source); |
| 241 | 241 |
| 242 int sourceLength = script.source.length(); | 242 int sourceLength = script.source.length(); |
| 243 int lineCount = 1; | 243 int lineCount = 1; |
| 244 int lastLineStart = 0; | 244 int lastLineStart = 0; |
| 245 for (int i = 0; i < sourceLength - 1; ++i) { | 245 for (int i = 0; i < sourceLength; ++i) { |
| 246 if (script.source[i] == '\n') { | 246 if (script.source[i] == '\n') { |
| 247 lineCount += 1; | 247 lineCount += 1; |
| 248 lastLineStart = i + 1; | 248 lastLineStart = i + 1; |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 script.endLine = script.startLine + lineCount - 1; | 252 script.endLine = script.startLine + lineCount - 1; |
| 253 if (lineCount == 1) | 253 if (lineCount == 1) |
| 254 script.endColumn = script.startColumn + sourceLength; | 254 script.endColumn = script.startColumn + sourceLength; |
| 255 else | 255 else |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 | 457 |
| 458 void ScriptDebugServer::recompileAllJSFunctionsSoon() | 458 void ScriptDebugServer::recompileAllJSFunctionsSoon() |
| 459 { | 459 { |
| 460 m_recompileTimer.startOneShot(0); | 460 m_recompileTimer.startOneShot(0); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace WebCore | 463 } // namespace WebCore |
| 464 | 464 |
| 465 #endif // ENABLE(JAVASCRIPT_DEBUGGER) | 465 #endif // ENABLE(JAVASCRIPT_DEBUGGER) |
| OLD | NEW |