Peer::initialize() should wake up a worker thread after initializing Bridge::m_peer

This is another fix for threading issues of WebSocket in oilpan builds.

Currently Peer::initialize() wakes up a worker thread before initializing Bridge::m_peer. Thus the following scenario can happen:

(1) Bridge::m_peer is initialized to 0.
(2) Bridge::initialize() is called in the worker thread.
(3) Peer::initialize() is called in the main thread.
(4) Peer::initialize() wakes up the worker thread before setting Bridge::m_peer.
(5) A shutdown event is sent to the worker thread.
(6) The worker thread calls Bridge::destroy().
(7) Bridge::destroy() calls Peer::destroy() using the Bridge::m_peer that is not yet initialized.

This will hopefully fix flaky crashes of worker-reload.html and worker-reload-repeated.html in oilpan builds:

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=http%2Ftests%2Fwebsocket%2Fworkers%2Fworker-reload-repeated.html%2Chttp%2Ftests%2Fwebsocket%2Fworkers%2Fworker-reload.html

Review URL: https://codereview.chromium.org/347933004

git-svn-id: svn://svn.chromium.org/blink/trunk@176911 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Prevent leak of target after its removing.

BUG=

Review URL: https://codereview.chromium.org/345183004

git-svn-id: svn://svn.chromium.org/blink/trunk@176912 bbb929c8-8fbe-4397-9dbb-9b2b20218538
SVG: Avoid adding element references on nested <use> on external document.

This has caused leak in oilpan builds.

r176803 moved element references management from per-Document ElementDependenciesMap to SVGElementRareData. This change allowed cross document SVGElement references.

In oilpan builds, these element references are made strong references. Normally, the strong reference cycles can be collected by oilpan-gc, but currently the external document is held via Persistent, so oilpan GC fails to collect the objects. The complete diagram of this reference cycle is here: https://docs.google.com/presentation/d/1U07XLSvNYa22Qfrgb0blojBraWRS235oNwxSkWecUxI/edit?usp=sharing

This patch avoids the situation by not adding element references when the target document is held by ResourcePtr. This should be safe, as the external document cannot by modified in any way. Also this reference was not present before r176803.

TEST=svg/batik/paints/gradientLimit.svg w/ --enable-leak-detection and ENABLE(OILPAN)
BUG=None

Review URL: https://codereview.chromium.org/351763004

git-svn-id: svn://svn.chromium.org/blink/trunk@176913 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename ScriptPromiseResolverWithContext to ScriptPromiseResolver.

I removed ScriptPromiseResolver at r176589.
This CL renames ScriptPromiseResolverWithContext to ScriptPromiseResolver.

BUG=386479

Review URL: https://codereview.chromium.org/350313002

git-svn-id: svn://svn.chromium.org/blink/trunk@176914 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Fix the oilpan-enabled android build.

BUG=350973
R=haraken@chromium.org

Review URL: https://codereview.chromium.org/356613003

git-svn-id: svn://svn.chromium.org/blink/trunk@176915 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Test that DevTools commands can be handled on worker thread when it is in a tight loop

The new test checks that when worker thread is blocked on a tight loop in JavaScript it can be interrupted to handle pending DevTools commands.

BUG=340522

Review URL: https://codereview.chromium.org/352103002

git-svn-id: svn://svn.chromium.org/blink/trunk@176916 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clarify comments about the role of the lex/parse table cache action

The comment claimed the explicit cache update step wasn't required, and
explained why we still did it. This was correct for a clean build, but
for an incremental build, when stale cache files might exist, it was
incorrect; the explicit cache update step is in fact required to refresh
a stale cache.

NOTRY=true

Review URL: https://codereview.chromium.org/335053003

git-svn-id: svn://svn.chromium.org/blink/trunk@176917 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Block insecure TextTrack content on secure sites.

Just like WebFonts, TextTracks are passive content with low-enough usage
that we can safely block them by default as mixed content.

BUG=388649

Review URL: https://codereview.chromium.org/352783002

git-svn-id: svn://svn.chromium.org/blink/trunk@176918 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Enable oilpan for WebMIDI by default

Systematic change:
- XWillBeY -> Y
- XWillBeNoop(Z) -> Z

BUG=340522

Review URL: https://codereview.chromium.org/354573002

git-svn-id: svn://svn.chromium.org/blink/trunk@176919 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL: Generate all constructor callbacks with the same template macro

Regular constructors and named constructors are similar enough that using
separate template macros to generate them mostly leads to duplicated code.

The actual difference is now more visible, since it takes the explicit
form

  {% if constructor.is_named_constructor %}
  // the difference
  {% endif %}

in the shared macro.

Review URL: https://codereview.chromium.org/349523004

git-svn-id: svn://svn.chromium.org/blink/trunk@176920 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL: Use installAttribute() in install_do_not_check_security_signature()

We call SetAccessor() directly in the interface.cpp template, but it
would be better to use V8DOMConfiguration::installAttribute() instead.
Removing one FIXME.

BUG=345503

Review URL: https://codereview.chromium.org/356563005

git-svn-id: svn://svn.chromium.org/blink/trunk@176921 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove the ChromeClient.h include from RenderLayerCompositor.h

ChromeClient isn't used in RenderLayerCompositor.h at all, so put the
includes where they belong and reduce header dependencies somewhat.

Review URL: https://codereview.chromium.org/351003002

git-svn-id: svn://svn.chromium.org/blink/trunk@176922 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove forward declared NSMenu/NSResponder from ChromeClient.h

This was added in http://trac.webkit.org/changeset/30740

Neither symbol is used in ChromeClient.h.

core/rendering/RenderThemeChromiumMac.h uses NSMenu, but appears to
get the declaration/definition from elsewhere, together with a few
other NS* symbols.

Review URL: https://codereview.chromium.org/352783003

git-svn-id: svn://svn.chromium.org/blink/trunk@176923 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rebaseline return-from-printing-mode.html

Retina results are now aligned with other platforms.

TBR=timloh@chromium.org

Review URL: https://codereview.chromium.org/356743002

git-svn-id: svn://svn.chromium.org/blink/trunk@176924 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: fight responsive design-related paint storms.
This also adds missing flex to the tabbed-pane that I think is Ok to fix in a generic manner. Wdyt?
R=dgozman,vsevik

Review URL: https://codereview.chromium.org/346213002

git-svn-id: svn://svn.chromium.org/blink/trunk@176925 bbb929c8-8fbe-4397-9dbb-9b2b20218538