WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
stack.patch (text/plain), 5.51 KB, created by
Kwang Yul Seo
on 2010-06-24 00:06:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kwang Yul Seo
Created:
2010-06-24 00:06:06 PDT
Size:
5.51 KB
patch
obsolete
>Index: JavaScriptCore/ChangeLog >=================================================================== >--- JavaScriptCore/ChangeLog (revision 61742) >+++ JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2010-06-23 Kwang Yul Seo <skyul@company100.net> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ [BREWMP] Port currentThreadStackBase >+ https://bugs.webkit.org/show_bug.cgi?id=33580 >+ >+ As Brew MP does not provide an API to retrieve the stack base address, >+ delegate it to the WebKit API. WebKit API must call >+ WTF::initializeThreadStackBaseBrew in initialization code. >+ >+ * runtime/Collector.cpp: >+ (JSC::currentThreadStackBase): >+ * wtf/brew/StackBaseBrew.cpp: Added. >+ (WTF::initializeThreadStackBaseBrew): >+ (WTF::currentThreadStackBaseBrew): >+ * wtf/brew/StackBaseBrew.h: Added. >+ > 2010-06-23 Oliver Hunt <oliver@apple.com> > > Reviewed by Gavin Barraclough. >Index: JavaScriptCore/runtime/Collector.cpp >=================================================================== >--- JavaScriptCore/runtime/Collector.cpp (revision 61737) >+++ JavaScriptCore/runtime/Collector.cpp (working copy) >@@ -62,6 +62,10 @@ > > #include <OS.h> > >+#elif PLATFORM(BREWMP) >+ >+#include <wtf/brew/StackBaseBrew.h> >+ > #elif OS(UNIX) > > #include <stdlib.h> >@@ -613,6 +617,12 @@ static inline void* currentThreadStackBa > int dummy; > return getStackBase(&dummy); > } >+#elif PLATFORM(BREWMP) >+ AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); >+ MutexLocker locker(mutex); >+ // There is no public BREW MP API to retrieve the stack base address. >+ // Make embedders provide this function on their own. >+ return currentThreadStackBaseBrew(); > #else > #error Need a way to get the stack base on this platform > #endif >Index: JavaScriptCore/wtf/brew/StackBaseBrew.cpp >=================================================================== >--- JavaScriptCore/wtf/brew/StackBaseBrew.cpp (revision 0) >+++ JavaScriptCore/wtf/brew/StackBaseBrew.cpp (revision 0) >@@ -0,0 +1,43 @@ >+/* >+ * Copyright (C) 2010 Company 100 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. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 COMPUTER, INC. OR >+ * 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 "StackBaseBrew.h" >+ >+namespace WTF { >+ >+static void* s_stackAddressBrew; >+ >+void initializeThreadStackBaseBrew(void* stackAddress) >+{ >+ s_stackAddressBrew = stackAddress; >+} >+ >+void* currentThreadStackBaseBrew() >+{ >+ return s_stackAddressBrew; >+} >+ >+} >Index: JavaScriptCore/wtf/brew/StackBaseBrew.h >=================================================================== >--- JavaScriptCore/wtf/brew/StackBaseBrew.h (revision 0) >+++ JavaScriptCore/wtf/brew/StackBaseBrew.h (revision 0) >@@ -0,0 +1,40 @@ >+/* >+ * Copyright (C) 2010 Company 100 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. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 COMPUTER, INC. OR >+ * 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 StackBaseBrew_h >+#define StackBaseBrew_h >+ >+namespace WTF { >+ >+void initializeThreadStackBaseBrew(void*); >+ >+void* currentThreadStackBaseBrew(); >+ >+} >+ >+using WTF::initializeThreadStackBaseBrew; >+using WTF::currentThreadStackBaseBrew; >+ >+#endif // StackBase_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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 33580
:
46431
|
59617
|
59618