Commit 1ce6049f authored by zerny's avatar zerny Committed by Commit bot

Blink GC plugin: Don't check conditions on invalid compilation units.

BUG=421958, 334149
R=hans@chromium.org, haraken@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#299084}
parent 17f92cd3
...@@ -861,6 +861,10 @@ class BlinkGCPluginConsumer : public ASTConsumer { ...@@ -861,6 +861,10 @@ class BlinkGCPluginConsumer : public ASTConsumer {
} }
void HandleTranslationUnit(ASTContext& context) override { void HandleTranslationUnit(ASTContext& context) override {
// Don't run the plugin if the compilation unit is already invalid.
if (diagnostic_.hasErrorOccurred())
return;
CollectVisitor visitor; CollectVisitor visitor;
visitor.TraverseDecl(context.getTranslationUnitDecl()); visitor.TraverseDecl(context.getTranslationUnitDecl());
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "crash_on_invalid.h"
// Nothing to define.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Regression test for http://crbug.com/421958
#ifndef CRASH_ON_INVALID_H_
#define CRASH_ON_INVALID_H_
namespace blink {
class Visitor;
class GamepadCommon {};
class ScriptWrappable {};
class Gamepad final : public GarbageCollectedFinalized<Gamepad>,
public GamepadCommon,
public ScriptWrappable {
public:
virtual const WrapperTypeInfo *wrapperTypeInfo() const {}
void trace(Visitor *);
};
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment