mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[dart2js] Fix failing web/deferred_fail_and_retry_test on d8 platform.
'document.body' is not defined on the d8 platform but 'document' is so this was throwing. Change-Id: I6e4049d86beedf4dbadee466fa581e4d3426df41 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311560 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
This commit is contained in:
parent
d9b676b0be
commit
6378357ef4
|
@ -15,7 +15,7 @@ main() {
|
|||
js.context.callMethod("eval", [
|
||||
"""
|
||||
retryCount = 0;
|
||||
if (self.document) {
|
||||
if (self.document && self.document.body) {
|
||||
oldAppendChild = document.body.appendChild;
|
||||
replacement = function(element) {
|
||||
element.src = "non_existing.js";
|
||||
|
|
|
@ -17,7 +17,7 @@ main() {
|
|||
js.context.callMethod("eval", [
|
||||
"""
|
||||
retryCount = 0;
|
||||
if (self.document) {
|
||||
if (self.document && self.document.body) {
|
||||
oldAppendChild = document.body.appendChild;
|
||||
replacement = function(element) {
|
||||
element.src = "non_existing.js";
|
||||
|
|
Loading…
Reference in a new issue