Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (121392 => 121393)
--- trunk/Source/_javascript_Core/ChangeLog 2012-06-28 01:05:27 UTC (rev 121392)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-06-28 01:09:22 UTC (rev 121393)
@@ -1,3 +1,14 @@
+2012-06-27 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r121359.
+ http://trac.webkit.org/changeset/121359
+ https://bugs.webkit.org/show_bug.cgi?id=90115
+
+ Broke many inspector tests (Requested by jpfau on #webkit).
+
+ * interpreter/Interpreter.h:
+ (JSC::StackFrame::toString):
+
2012-06-27 Filip Pizlo <[email protected]>
_javascript_ SHA-512 gives wrong hash on second and subsequent runs unless Web Inspector _javascript_ Debugging is on
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.h (121392 => 121393)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.h 2012-06-28 01:05:27 UTC (rev 121392)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.h 2012-06-28 01:09:22 UTC (rev 121393)
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,7 +39,6 @@
#include "RegisterFile.h"
#include <wtf/HashMap.h>
-#include <wtf/text/StringBuilder.h>
namespace JSC {
@@ -82,62 +80,46 @@
UString sourceURL;
UString toString(CallFrame* callFrame) const
{
- StringBuilder traceBuild;
- String functionName = friendlyFunctionName(callFrame);
- String sourceURL = friendlySourceURL();
- traceBuild.append(functionName);
- if (!functionName.isEmpty() && !sourceURL.isEmpty())
- traceBuild.append('@');
- traceBuild.append(sourceURL);
- if (line > -1) {
- traceBuild.append(':');
- traceBuild.append(String::number(line));
- }
- return traceBuild.toString().impl();
- }
- String friendlySourceURL() const
- {
+ bool hasSourceURLInfo = !sourceURL.isNull() && !sourceURL.isEmpty();
+ bool hasLineInfo = line > -1;
String traceLine;
+ JSObject* stackFrameCallee = callee.get();
switch (codeType) {
case StackFrameEvalCode:
- case StackFrameFunctionCode:
- case StackFrameGlobalCode:
- if (!sourceURL.isEmpty())
- traceLine = sourceURL.impl();
+ if (hasSourceURLInfo) {
+ traceLine = hasLineInfo ? String::format("eval code@%s:%d", sourceURL.ascii().data(), line)
+ : String::format("eval code@%s", sourceURL.ascii().data());
+ } else
+ traceLine = String::format("eval code");
break;
- case StackFrameNativeCode:
- traceLine = "[native code]";
+ case StackFrameNativeCode: {
+ if (callee) {
+ UString functionName = getCalculatedDisplayName(callFrame, stackFrameCallee);
+ traceLine = String::format("%s@[native code]", functionName.ascii().data());
+ } else
+ traceLine = "[native code]";
break;
}
- return traceLine.isNull() ? emptyString() : traceLine;
- }
- String friendlyFunctionName(CallFrame* callFrame) const
- {
- String traceLine;
- JSObject* stackFrameCallee = callee.get();
-
- switch (codeType) {
- case StackFrameEvalCode:
- traceLine = "eval code";
+ case StackFrameFunctionCode: {
+ UString functionName = getCalculatedDisplayName(callFrame, stackFrameCallee);
+ if (hasSourceURLInfo) {
+ traceLine = hasLineInfo ? String::format("%s@%s:%d", functionName.ascii().data(), sourceURL.ascii().data(), line)
+ : String::format("%s@%s", functionName.ascii().data(), sourceURL.ascii().data());
+ } else
+ traceLine = String::format("%s\n", functionName.ascii().data());
break;
- case StackFrameNativeCode:
- if (callee)
- traceLine = getCalculatedDisplayName(callFrame, stackFrameCallee).impl();
- break;
- case StackFrameFunctionCode:
- traceLine = getCalculatedDisplayName(callFrame, stackFrameCallee).impl();
- break;
+ }
case StackFrameGlobalCode:
- traceLine = "global code";
- break;
+ if (hasSourceURLInfo) {
+ traceLine = hasLineInfo ? String::format("global code@%s:%d", sourceURL.ascii().data(), line)
+ : String::format("global code@%s", sourceURL.ascii().data());
+ } else
+ traceLine = String::format("global code");
+
}
- return traceLine.isNull() ? emptyString() : traceLine;
+ return traceLine.impl();
}
- unsigned friendlyLineNumber() const
- {
- return line > -1 ? line : 0;
- }
};
class TopCallFrameSetter {
Modified: trunk/Source/WebCore/ChangeLog (121392 => 121393)
--- trunk/Source/WebCore/ChangeLog 2012-06-28 01:05:27 UTC (rev 121392)
+++ trunk/Source/WebCore/ChangeLog 2012-06-28 01:09:22 UTC (rev 121393)
@@ -1,3 +1,14 @@
+2012-06-27 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r121359.
+ http://trac.webkit.org/changeset/121359
+ https://bugs.webkit.org/show_bug.cgi?id=90115
+
+ Broke many inspector tests (Requested by jpfau on #webkit).
+
+ * bindings/js/ScriptCallStackFactory.cpp:
+ (WebCore::createScriptCallStack):
+
2012-06-27 Alexis Menard <[email protected]>
Implement selectedOptions attribute of HTMLSelectElement.
Modified: trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp (121392 => 121393)
--- trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp 2012-06-28 01:05:27 UTC (rev 121392)
+++ trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp 2012-06-28 01:09:22 UTC (rev 121393)
@@ -1,6 +1,5 @@
/*
* Copyright (c) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -34,7 +33,6 @@
#include "InspectorInstrumentation.h"
#include "JSDOMBinding.h"
-#include "JSMainThreadExecState.h"
#include "ScriptArguments.h"
#include "ScriptCallFrame.h"
#include "ScriptCallStack.h"
@@ -53,26 +51,9 @@
class ScriptExecutionContext;
-PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyIsAllowed)
+PassRefPtr<ScriptCallStack> createScriptCallStack(size_t, bool)
{
- Vector<ScriptCallFrame> frames;
- if (JSC::ExecState* exec = JSMainThreadExecState::currentState()) {
- Vector<StackFrame> stackTrace;
- Interpreter::getStackTrace(&exec->globalData(), stackTrace);
- for (Vector<StackFrame>::const_iterator iter = stackTrace.begin(); iter < stackTrace.end(); iter++) {
- StackFrame level = *iter;
- frames.append(ScriptCallFrame(level.friendlyFunctionName(exec), level.friendlySourceURL(), level.friendlyLineNumber()));
- if (frames.size() >= maxStackSize)
- break;
- }
- }
- if (frames.isEmpty() && !emptyIsAllowed) {
- // No frames found. It may happen in the case where
- // a bound function is called from native code for example.
- // Fallback to setting lineNumber to 0, and source and function name to "undefined".
- frames.append(ScriptCallFrame("undefined", "undefined", 0));
- }
- return ScriptCallStack::create(frames);
+ return 0;
}
PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState* exec, size_t maxStackSize)