[Shadow DOM][V8] Assertion failure when shadow host is reclaimed before ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=102893

Reviewed by Kentaro Hara.

Source/WebCore:

Due to bug 88834, shadow hosts can be reclaimed before
corresponding ShadowRoots are.  This breaks an invariant, that is,
the host is always available for any ShadowRoot.  This change adds
guards for the possibly broken invariant.

Since bug 88834 is planned to be fixed shortly, this change
doesn't aim to fix this problem by make it work correctly, but
just lays a safety net which is needed until the root cause is
gone.

Test: fast/dom/shadow/host-wrapper-reclaimed.html

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setInnerHTML):
(WebCore::ShadowRoot::setApplyAuthorStyles):
(WebCore::ShadowRoot::setResetStyleInheritance):
(WebCore::ShadowRoot::childrenChanged):

LayoutTests:

* fast/dom/shadow/host-wrapper-reclaimed-expected.txt: Added.
* fast/dom/shadow/host-wrapper-reclaimed.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Baseline JIT's disassembly should be just as pretty as the DFG's
https://bugs.webkit.org/show_bug.cgi?id=102873

Reviewed by Sam Weinig.

Integrated the CodeBlock's bytecode dumper with the JIT's disassembler. Also fixed
some type goof-ups (instructions are not in a Vector<Instruction> so using a Vector
iterator makes no sense) and stream-lined some things (you don't actually need a
full-fledged ExecState* to dump bytecode).

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::CodeBlock::dump):
(JSC):
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(CodeBlock):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpCallFrame):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JIT):
* jit/JITDisassembler.cpp: Added.
(JSC):
(JSC::JITDisassembler::JITDisassembler):
(JSC::JITDisassembler::~JITDisassembler):
(JSC::JITDisassembler::dump):
(JSC::JITDisassembler::dumpForInstructions):
(JSC::JITDisassembler::dumpDisassembly):
* jit/JITDisassembler.h: Added.
(JSC):
(JITDisassembler):
(JSC::JITDisassembler::setStartOfCode):
(JSC::JITDisassembler::setForBytecodeMainPath):
(JSC::JITDisassembler::setForBytecodeSlowPath):
(JSC::JITDisassembler::setEndOfSlowPath):
(JSC::JITDisassembler::setEndOfCode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Resource Timing] Populate PerformanceResourceTiming structs with timing data
https://bugs.webkit.org/show_bug.cgi?id=102862

Reviewed by Tony Gentilcore.

This allows CachedResourceLoader to pass in all of the necessary values and populates
them in the PerformanceResourceTiming struct. A follow up patch will actually call
addResourceTiming() as necessary.

Tests: http/tests/w3c/webperf/submission/resource-timing

* page/Performance.cpp:
(WebCore::Performance::addResourceTiming): Accept all necessary timing data.
* page/Performance.h:
(WebCore):
(Performance):
* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::PerformanceEntry):
* page/PerformanceEntry.h:
(PerformanceEntry):
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
(WebCore):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::initiatorType): Return the spec'd values.
(WebCore::PerformanceResourceTiming::fetchStart):
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
(WebCore::PerformanceResourceTiming::responseStart):
(WebCore::PerformanceResourceTiming::responseEnd):
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::create):
(PerformanceResourceTiming):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135458 268f45cc-cd09-0410-ab3c-d52691b4dbfc