diff options
-rw-r--r-- | webkit/build/V8Bindings/SConscript | 7 | ||||
-rw-r--r-- | webkit/port/bindings/v8/np_v8object.cpp | 2 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.cpp | 7 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_events.cpp | 4 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 14 | ||||
-rw-r--r-- | webkit/port/page/inspector/InspectorController.cpp | 17 |
6 files changed, 21 insertions, 30 deletions
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript index 974e7c6..710763e 100644 --- a/webkit/build/V8Bindings/SConscript +++ b/webkit/build/V8Bindings/SConscript @@ -31,13 +31,6 @@ else: '$LIBXML_DIR/include', ]) -if env['PLATFORM'] == 'posix': - env.Append( - CCFLAGS = [ - '-Wno-error' - ] - ) - inputs = [ '$SHARED_DIR/PausedTimeouts.cpp', diff --git a/webkit/port/bindings/v8/np_v8object.cpp b/webkit/port/bindings/v8/np_v8object.cpp index 7e6b8b3..9bce40d 100644 --- a/webkit/port/bindings/v8/np_v8object.cpp +++ b/webkit/port/bindings/v8/np_v8object.cpp @@ -432,8 +432,6 @@ bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName) { void NPN_SetException(NPObject *npobj, const NPUTF8 *message) { if (npobj->_class == NPScriptObjectClass) { - V8NPObject *object = reinterpret_cast<V8NPObject*>(npobj); - v8::HandleScope handle_scope; v8::Handle<v8::Context> context = GetV8Context(NULL, npobj); if (context.IsEmpty()) return; diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp index c064246..ea290e0 100644 --- a/webkit/port/bindings/v8/v8_custom.cpp +++ b/webkit/port/bindings/v8/v8_custom.cpp @@ -163,8 +163,8 @@ class V8ScheduledAction : public ScheduledAction { public: V8ScheduledAction(v8::Handle<v8::Function> func, int argc, v8::Handle<v8::Value> argv[]); - explicit V8ScheduledAction(const WebCore::String& code) : m_code(code), - m_argc(0), m_argv(NULL) { } + explicit V8ScheduledAction(const WebCore::String& code) : m_argc(0), + m_argv(0), m_code(code) { } virtual ~V8ScheduledAction(); virtual void execute(DOMWindow* window); @@ -1893,7 +1893,6 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeRect) { CanvasRenderingContext2D* context = V8Proxy::ToNativeObject<CanvasRenderingContext2D>( V8ClassIndex::CANVASRENDERINGCONTEXT2D, args.Holder()); - double x = 0, y = 0, width = 0, height = 0, line_width = 0; if (args.Length() == 5) { context->strokeRect(TO_FLOAT(args[0]), TO_FLOAT(args[1]), @@ -3544,6 +3543,8 @@ Frame* V8Custom::GetTargetFrame(v8::Local<v8::Object> host, target = imp->frame(); break; } + default: + break; } return target; } diff --git a/webkit/port/bindings/v8/v8_events.cpp b/webkit/port/bindings/v8/v8_events.cpp index 33bb48f..b088f15 100644 --- a/webkit/port/bindings/v8/v8_events.cpp +++ b/webkit/port/bindings/v8/v8_events.cpp @@ -429,10 +429,6 @@ v8::Local<v8::Function> V8LazyEventListener::GetWrappedListenerFunction() { // TODO(fqian): cache the wrapper function. String code = "(function (evt) {\n"; - // This variable records how many lines the code has been offset within the - // source code to be evaluated - int codeOffset = 2; - // Nodes other than the document object, when executing inline event // handlers push document, form, and the target node on the scope chain. // We do this by using 'with' statement. diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 1f6bd40..76b475b 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -165,17 +165,24 @@ static GlobalHandleMap& global_handle_map() } +// The USE_VAR(x) template is used to silence C++ compiler warnings +// issued for unused variables (typically parameters or values that +// we want to watch in the debugger). +template <typename T> +static inline void USE_VAR(T) { } + // The function is the place to set the break point to inspect // live global handles. Leaks are often come from leaked global handles. static void EnumerateGlobalHandles() { for (GlobalHandleMap::iterator it = global_handle_map().begin(), end = global_handle_map().end(); it != end; ++it) { GlobalHandleInfo* info = it->second; + USE_VAR(info); v8::Value* handle = it->first; + USE_VAR(handle); } } - void V8Proxy::RegisterGlobalHandle(GlobalHandleType type, void* host, v8::Persistent<v8::Value> handle) { ASSERT(!global_handle_map().contains(*handle)); @@ -433,6 +440,7 @@ static void GCPrologue() it != end; ++it) { Peerable* obj = it->first; ASSERT(v8::Persistent<v8::Object>(it->second).IsWeak()); + USE_VAR(obj); } #endif @@ -468,6 +476,7 @@ static void GCEpilogue() { for (PeerableMap::iterator it = peer_map.begin(), end = peer_map.end(); it != end; ++it) { Peerable* obj = it->first; + USE_VAR(obj); ASSERT(v8::Persistent<v8::Object>(it->second).IsWeak()); } @@ -475,10 +484,13 @@ static void GCEpilogue() { for (NodeMap::iterator it = node_map.begin(), end = node_map.end(); it != end; ++it) { Node* node = it->first; + USE_VAR(node); ASSERT(v8::Persistent<v8::Object>(it->second).IsWeak()); } EnumerateGlobalHandles(); + +#undef USE_VAR #endif } diff --git a/webkit/port/page/inspector/InspectorController.cpp b/webkit/port/page/inspector/InspectorController.cpp index 52dfab9..7aa0a44 100644 --- a/webkit/port/page/inspector/InspectorController.cpp +++ b/webkit/port/page/inspector/InspectorController.cpp @@ -82,7 +82,7 @@ namespace WebCore { // Maximum size of the console message cache. -static const int MAX_CONSOLE_MESSAGES = 250; +static const size_t MAX_CONSOLE_MESSAGES = 250; namespace bug1228513 { // TODO(ericroman): Temporary hacks to help diagnose http://b/1228513 @@ -277,6 +277,8 @@ struct InspectorResource : public RefCounted<InspectorResource> { } break; #endif + default: + break; } } @@ -576,6 +578,7 @@ InspectorController::InspectorController(Page* page, InspectorClient* client) // to start the RefCount at 0. RefCounted<InspectorController>(0) , m_bug1228513_inspectorState(bug1228513::VALID) + , m_trackResources(false) , m_inspectedPage(page) , m_client(client) , m_page(0) @@ -585,7 +588,6 @@ InspectorController::InspectorController(Page* page, InspectorClient* client) , m_recordingUserInitiatedProfile(false) , m_showAfterVisible(ElementsPanel) , m_nextIdentifier(-2) - , m_trackResources(false) , m_groupLevel(0) { ASSERT_ARG(page, page); @@ -641,17 +643,6 @@ String InspectorController::localizedStringsURL() return m_client->localizedStringsURL(); } -// Trying to inspect something in a frame with JavaScript disabled would later lead to -// crashes trying to create JavaScript wrappers. Some day we could fix this issue, but -// for now prevent crashes here by never targeting a node in such a frame. -static bool canPassNodeToJavaScript(Node* node) -{ - if (!node) - return false; - Frame* frame = node->document()->frame(); - return frame && frame->script()->isEnabled(); -} - void InspectorController::inspect(Node* node) { if (!node || !enabled()) |