WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
missing files from original patch
patch-missing-files.txt (text/plain), 6.43 KB, created by
Geoffrey Garen
on 2008-05-18 00:41:26 PDT
(
hide
)
Description:
missing files from original patch
Filename:
MIME Type:
Creator:
Geoffrey Garen
Created:
2008-05-18 00:41:26 PDT
Size:
6.43 KB
patch
obsolete
>Index: kjs/DebuggerCallFrame.cpp >=================================================================== >--- kjs/DebuggerCallFrame.cpp (revision 0) >+++ kjs/DebuggerCallFrame.cpp (revision 0) >@@ -0,0 +1,86 @@ >+/* >+ * Copyright (C) 2008 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of >+ * its contributors may be used to endorse or promote products derived >+ * from this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY >+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND >+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "DebuggerCallFrame.h" >+ >+#include "function.h" >+#include "CodeBlock.h" >+#include "Machine.h" >+#include "Parser.h" >+ >+namespace KJS { >+ >+const UString* DebuggerCallFrame::functionName() >+{ >+ if (!m_codeBlock) >+ return 0; >+ >+ int callFrameOffset = m_registerOffset - m_codeBlock->numLocals - Machine::CallFrameHeaderSize; >+ if (callFrameOffset < 0) >+ return 0; >+ >+ Register* callFrame = *m_registerBase + callFrameOffset; >+ FunctionImp* function = static_cast<FunctionImp*>(callFrame[Machine::Callee].u.jsValue); >+ if (!function) >+ return 0; >+ return &function->functionName().ustring(); >+} >+ >+JSObject* DebuggerCallFrame::thisObject() const >+{ >+ if (!m_codeBlock) >+ return 0; >+ >+ return static_cast<JSObject*>((*m_registerBase + m_registerOffset)[m_codeBlock->thisRegister].u.jsValue); >+} >+ >+JSValue* DebuggerCallFrame::evaluateScript(const UString& script) >+{ >+ JSLock lock; >+ JSObject* thisObject = this->thisObject(); >+ if (!thisObject) >+ return 0; >+ >+ ExecState newExec(m_scopeChain->globalObject(), thisObject, m_scopeChain); >+ >+ int sourceId; >+ int errLine; >+ UString errMsg; >+ >+ RefPtr<EvalNode> evalNode = parser().parse<EvalNode>(&newExec, UString(), 0, UStringSourceProvider::create(script), &sourceId, &errLine, &errMsg); >+ >+ if (!evalNode) >+ return Error::create(&newExec, SyntaxError, errMsg, errLine, sourceId, 0); >+ >+ JSValue* exception = 0; >+ JSValue* result = machine().execute(evalNode.get(), &newExec, thisObject, &newExec.dynamicGlobalObject()->registerFileStack(), m_scopeChain, &exception); >+ return exception ? exception : result; >+} >+ >+} // namespace KJS >Index: kjs/DebuggerCallFrame.h >=================================================================== >--- kjs/DebuggerCallFrame.h (revision 0) >+++ kjs/DebuggerCallFrame.h (revision 0) >@@ -0,0 +1,71 @@ >+/* >+ * Copyright (C) 2008 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of >+ * its contributors may be used to endorse or promote products derived >+ * from this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY >+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND >+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef DebuggerCallFrame_h >+#define DebuggerCallFrame_h >+ >+namespace KJS { >+ >+ class CodeBlock; >+ class JSObject; >+ class JSValue; >+ class Machine; >+ class UString; >+ class Register; >+ class ScopeChainNode; >+ >+ class DebuggerCallFrame { >+ public: >+ DebuggerCallFrame(Machine* machine, const CodeBlock* codeBlock, ScopeChainNode* scopeChain, JSValue* exception, Register** registerBase, int registerOffset) >+ : m_machine(machine) >+ , m_codeBlock(codeBlock) >+ , m_scopeChain(scopeChain) >+ , m_exception(exception) >+ , m_registerBase(registerBase) >+ , m_registerOffset(registerOffset) >+ { >+ } >+ >+ const ScopeChainNode* scopeChain() const { return m_scopeChain; } >+ const UString* functionName(); >+ JSObject* thisObject() const; >+ JSValue* evaluateScript(const UString&); >+ JSValue* exception() const { return m_exception; } >+ >+ private: >+ Machine* m_machine; >+ const CodeBlock* m_codeBlock; >+ ScopeChainNode* m_scopeChain; >+ JSValue* m_exception; >+ Register** m_registerBase; >+ int m_registerOffset; >+ }; >+ >+} // namespace KJS >+ >+#endif // DebuggerCallFrame_h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
oliver
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 18625
:
21213
| 21219