summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.v8.mk1
-rw-r--r--JavaScriptCore/wtf/Platform.h1
-rw-r--r--WebCore/bindings/js/ScriptObject.cpp8
-rw-r--r--WebCore/bindings/v8/ScheduledAction.cpp2
-rw-r--r--WebCore/bindings/v8/ScriptController.cpp8
-rw-r--r--WebCore/bindings/v8/V8AbstractEventListener.cpp1
-rw-r--r--WebCore/bindings/v8/V8Proxy.cpp7
-rw-r--r--WebCore/bindings/v8/V8Utilities.h7
-rw-r--r--WebCore/bindings/v8/V8WorkerContextEventListener.cpp2
-rw-r--r--WebCore/bindings/v8/WorkerContextExecutionProxy.cpp2
-rw-r--r--WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp1
-rw-r--r--WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp2
-rw-r--r--WebCore/config.h2
-rw-r--r--WebCore/platform/graphics/wx/SimpleFontDataWx.cpp1
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp16
21 files changed, 14 insertions, 53 deletions
diff --git a/Android.v8.mk b/Android.v8.mk
index 2141840..0c068b1 100644
--- a/Android.v8.mk
+++ b/Android.v8.mk
@@ -151,7 +151,6 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/WebCore/rendering \
$(LOCAL_PATH)/WebCore/rendering/style \
$(LOCAL_PATH)/WebCore/storage \
- $(LOCAL_PATH)/WebCore/websockets \
$(LOCAL_PATH)/WebCore/workers \
$(LOCAL_PATH)/WebCore/xml \
$(LOCAL_PATH)/WebKit/android \
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index cde4c17..bc25c8c 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -505,7 +505,6 @@
#endif
#define HAVE_READLINE 1
#define HAVE_RUNLOOP_TIMER 1
-#define HAVE_PTHREAD_RWLOCK 1
#endif /* PLATFORM(MAC) && !PLATFORM(IPHONE) */
#if PLATFORM(CHROMIUM) && PLATFORM(DARWIN)
diff --git a/WebCore/bindings/js/ScriptObject.cpp b/WebCore/bindings/js/ScriptObject.cpp
index b69ef2b..f14145e 100644
--- a/WebCore/bindings/js/ScriptObject.cpp
+++ b/WebCore/bindings/js/ScriptObject.cpp
@@ -33,12 +33,12 @@
#include "JSDOMBinding.h"
-#if ENABLE(JAVASCRIPT_DEBUGGER)
+#include <runtime/JSLock.h>
+
+#if ENABLE(INSPECTOR)
#include "JSInspectorBackend.h"
#endif
-#include <runtime/JSLock.h>
-
using namespace JSC;
namespace WebCore {
@@ -135,7 +135,6 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
return handleException(scriptState);
}
-#if ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(INSPECTOR)
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value)
{
@@ -145,7 +144,6 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, Inspect
return handleException(scriptState);
}
#endif // ENABLE(INSPECTOR)
-#endif
bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value)
{
diff --git a/WebCore/bindings/v8/ScheduledAction.cpp b/WebCore/bindings/v8/ScheduledAction.cpp
index 268e177..4f321cb 100644
--- a/WebCore/bindings/v8/ScheduledAction.cpp
+++ b/WebCore/bindings/v8/ScheduledAction.cpp
@@ -106,7 +106,6 @@ void ScheduledAction::execute(V8Proxy* proxy)
{
ASSERT(proxy);
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = v8::Local<v8::Context>::New(m_context.get());
if (v8Context.IsEmpty())
@@ -135,7 +134,6 @@ void ScheduledAction::execute(WorkerContext* workerContext)
WorkerScriptController* scriptController = workerContext->script();
if (!m_function.IsEmpty() && m_function->IsFunction()) {
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = v8::Local<v8::Context>::New(m_context.get());
ASSERT(!v8Context.IsEmpty());
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index b1614c6..35a2d73 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -156,7 +156,7 @@ bool ScriptController::processingUserGesture() const
return true;
V8Proxy* activeProxy = activeFrame->script()->proxy();
- LOCK_V8;
+
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(activeFrame);
// FIXME: find all cases context can be empty:
@@ -215,7 +215,6 @@ void ScriptController::evaluateInNewContext(const Vector<ScriptSourceCode>& sour
// Evaluate a script file in the environment of this proxy.
ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
- LOCK_V8;
String sourceURL = sourceCode.url();
if (!m_XSSAuditor->canEvaluate(sourceCode.source())) {
@@ -257,7 +256,6 @@ void ScriptController::finishedWithEvent(Event* event)
// Create a V8 object with an interceptor of NPObjectPropertyGetter.
void ScriptController::bindToWindowObject(Frame* frame, const String& key, NPObject* object)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(frame);
@@ -275,13 +273,13 @@ void ScriptController::bindToWindowObject(Frame* frame, const String& key, NPObj
void ScriptController::collectGarbage()
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_proxy->frame());
if (v8Context.IsEmpty())
return;
v8::Context::Scope scope(v8Context);
+
m_proxy->evaluate(ScriptSourceCode("if (window.gc) void(gc());"), 0);
}
@@ -372,7 +370,6 @@ static NPObject* createNoScriptObject()
static NPObject* createScriptObject(Frame* frame)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(frame);
if (v8Context.IsEmpty())
@@ -410,7 +407,6 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
if (!isEnabled())
return createNoScriptObject();
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_frame);
if (v8Context.IsEmpty())
diff --git a/WebCore/bindings/v8/V8AbstractEventListener.cpp b/WebCore/bindings/v8/V8AbstractEventListener.cpp
index 675e466..f27c619 100644
--- a/WebCore/bindings/v8/V8AbstractEventListener.cpp
+++ b/WebCore/bindings/v8/V8AbstractEventListener.cpp
@@ -78,7 +78,6 @@ void V8AbstractEventListener::handleEvent(ScriptExecutionContext* context, Event
// See issue 889829.
RefPtr<V8AbstractEventListener> protect(this);
- LOCK_V8;
v8::HandleScope handleScope;
v8::Local<v8::Context> v8Context = toV8Context(context);
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index d6f5b9f..64424f3 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -284,6 +284,7 @@ bool V8Proxy::handleOutOfMemory()
// TODO (andreip): ChromeBridge -> BrowserBridge?
ChromiumBridge::notifyJSOutOfMemory(frame);
#endif
+
// Disable JS.
Settings* settings = frame->settings();
ASSERT(settings);
@@ -384,7 +385,6 @@ void V8Proxy::setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetCont
v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* node)
{
ASSERT(v8::Context::InContext());
- LOCK_V8;
v8::Local<v8::Value> result;
{
@@ -726,7 +726,6 @@ void V8Proxy::clearDocumentWrapper()
void V8Proxy::updateDocumentWrapperCache()
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Context::Scope contextScope(m_context);
@@ -810,7 +809,6 @@ void V8Proxy::clearForClose()
resetIsolatedWorlds();
if (!m_context.IsEmpty()) {
- LOCK_V8;
v8::HandleScope handleScope;
clearDocumentWrapper();
@@ -824,7 +822,6 @@ void V8Proxy::clearForNavigation()
resetIsolatedWorlds();
if (!m_context.IsEmpty()) {
- LOCK_V8;
v8::HandleScope handle;
clearDocumentWrapper();
@@ -909,7 +906,6 @@ void V8Proxy::updateDocument()
void V8Proxy::updateSecurityOrigin()
{
- LOCK_V8;
v8::HandleScope scope;
setSecurityToken();
}
@@ -1113,7 +1109,6 @@ void V8Proxy::initContextIfNeeded()
#ifdef ANDROID_INSTRUMENT
android::TimeCounter::start(android::TimeCounter::JavaScriptInitTimeCounter);
#endif
- LOCK_V8;
// Create a handle scope for all local handles.
v8::HandleScope handleScope;
diff --git a/WebCore/bindings/v8/V8Utilities.h b/WebCore/bindings/v8/V8Utilities.h
index 1a713c9..36dce24 100644
--- a/WebCore/bindings/v8/V8Utilities.h
+++ b/WebCore/bindings/v8/V8Utilities.h
@@ -31,13 +31,6 @@
#ifndef V8Utilities_h
#define V8Utilities_h
-#if ENABLE(V8_LOCKERS)
-// TODO(benm): Need to re-add in locking for V8. We lost some of the lock points during the merge. Define it to void here so we don't lock some of the time.
-#define LOCK_V8 ((void) 0)
-#else
-#define LOCK_V8 ((void) 0)
-#endif
-
#include <v8.h>
namespace WebCore {
diff --git a/WebCore/bindings/v8/V8WorkerContextEventListener.cpp b/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
index 3800e04..8dc4b8d 100644
--- a/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
+++ b/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
@@ -36,7 +36,6 @@
#include "Event.h"
#include "V8Binding.h"
-#include "V8Utilities.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
@@ -64,7 +63,6 @@ void V8WorkerContextEventListener::handleEvent(ScriptExecutionContext* context,
// See issue 889829.
RefPtr<V8AbstractEventListener> protect(this);
- LOCK_V8;
v8::HandleScope handleScope;
WorkerContextExecutionProxy* proxy = workerProxy(context);
diff --git a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
index b93619b..0fd0f8f 100644
--- a/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
+++ b/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
@@ -120,7 +120,6 @@ void WorkerContextExecutionProxy::initV8IfNeeded()
{
static bool v8Initialized = false;
- LOCK_V8;
if (v8Initialized)
return;
@@ -350,7 +349,6 @@ bool WorkerContextExecutionProxy::forgetV8EventObject(Event* event)
ScriptValue WorkerContextExecutionProxy::evaluate(const String& script, const String& fileName, int baseLine, WorkerContextExecutionState* state)
{
- LOCK_V8;
v8::HandleScope hs;
initContextIfNeeded();
diff --git a/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp b/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp
index 4f2fe0e..0fb0f78 100644
--- a/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp
@@ -49,7 +49,6 @@ V8CustomPositionCallback::~V8CustomPositionCallback()
void V8CustomPositionCallback::handleEvent(Geoposition* position)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp
index e446d85..bd36f88 100644
--- a/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp
@@ -49,7 +49,6 @@ V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback()
void V8CustomPositionErrorCallback::handleEvent(PositionError* error)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp
index 2abdb15..64abdc4 100644
--- a/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementCallback.cpp
@@ -52,7 +52,6 @@ V8CustomSQLStatementCallback::~V8CustomSQLStatementCallback()
void V8CustomSQLStatementCallback::handleEvent(SQLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
index efab455..1af3562 100644
--- a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
@@ -52,7 +52,6 @@ V8CustomSQLStatementErrorCallback::~V8CustomSQLStatementErrorCallback()
bool V8CustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLError* error)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp
index 704115e..2cef6b3 100644
--- a/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp
@@ -53,7 +53,6 @@ V8CustomSQLTransactionCallback::~V8CustomSQLTransactionCallback()
void V8CustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bool& raisedException)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp
index f30467c..1a0939d 100644
--- a/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp
@@ -52,7 +52,6 @@ V8CustomSQLTransactionErrorCallback::~V8CustomSQLTransactionErrorCallback()
void V8CustomSQLTransactionErrorCallback::handleEvent(SQLError* error)
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp
index b538b33..94cb104 100644
--- a/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp
+++ b/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp
@@ -49,7 +49,6 @@ V8CustomVoidCallback::~V8CustomVoidCallback()
void V8CustomVoidCallback::handleEvent()
{
- LOCK_V8;
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get());
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index 7eccfb1..25d5ccd 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -56,7 +56,9 @@
#include "Settings.h"
#include "SharedWorkerRepository.h"
#include "Storage.h"
+#if ENABLE(WEB_SOCKETS)
#include "WebSocket.h"
+#endif
#include "WindowFeatures.h"
// Horizontal and vertical offset, from the parent content area, around newly
diff --git a/WebCore/config.h b/WebCore/config.h
index 3d3e274..5a647df 100644
--- a/WebCore/config.h
+++ b/WebCore/config.h
@@ -98,8 +98,6 @@
#define ENABLE_FTPDIR 0
#ifndef ENABLE_SVG
#define ENABLE_SVG 0
-#undef ENABLE_V8_LOCKERS
-#define ENABLE_V8_LOCKERS 1
#undef ENABLE_VIDEO
#define ENABLE_VIDEO 1
#undef ENABLE_WORKERS
diff --git a/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp b/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
index 2368f83..85979de 100644
--- a/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
+++ b/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
@@ -67,6 +67,7 @@ void SimpleFontData::platformCharWidthInit()
void SimpleFontData::platformDestroy()
{
delete m_smallCapsFontData;
+ m_smallCapsFontData = 0;
}
SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDescription) const
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 14e7dce..cf6514e 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -955,17 +955,11 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
}
if (!isConstrained) {
int screenWidth = view()->frameView()->screenWidth();
- if (screenWidth > 0 && width() > screenWidth) {
- // if the current padding is smaller, add an extra to make
- // it 2 * ANDROID_FCTS_MARGIN_PADDING so that the text won't
- // overlap with the screen edge. If the current padding is
- // negative, leave it alone.
- int padding = paddingLeft() + paddingRight();
- if (padding < 0 || padding >= 2 * ANDROID_FCTS_MARGIN_PADDING)
- padding = 0;
- else
- padding = 2 * ANDROID_FCTS_MARGIN_PADDING - padding;
- int maxWidth = screenWidth - padding;
+ int padding = paddingLeft() + paddingRight();
+ if (screenWidth > 0 && width() > (screenWidth + padding)) {
+ // limit the content width (width excluding padding) to be
+ // (screenWidth - 2 * ANDROID_FCTS_MARGIN_PADDING)
+ int maxWidth = screenWidth - 2 * ANDROID_FCTS_MARGIN_PADDING + padding;
setWidth(min(width(), maxWidth));
m_minPrefWidth = min(m_minPrefWidth, maxWidth);
m_maxPrefWidth = min(m_maxPrefWidth, maxWidth);