Commit e9b66e87 authored by Matheus Marchini's avatar Matheus Marchini Committed by Commit Bot

[inspector] explicitly declare default constructor

Node.js still support older versions of clang, and some of those
versions require us to explicitly declare default constructors for
classes. While updating V8 to 6.7 on Node.js we hit a build failure on
Mac OS X and FreeBSD because there was one constructor not complying
with that rule. This commit fixes it.

R=bmeurer@google.com, franzih@google.com, ofrobots@google.com, yangguo@google.com

Bug: v8:7743
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1f57f0c88c27e4755c9e05f6fedd9def55d8cb77
Reviewed-on: https://chromium-review.googlesource.com/1050666Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Cr-Commit-Position: refs/heads/master@{#53132}
parent f6fbbc0c
......@@ -88,7 +88,13 @@ class WasmTranslation::TranslatorImpl::RawTranslator
void TranslateBack(TransLocation*) override {}
const WasmSourceInformation& GetSourceInformation(v8::Isolate*,
int index) override {
static const WasmSourceInformation singleEmptySourceInformation;
// NOTE(mmarchini): prior to 3.9, clang won't accept const object
// instantiations with non-user-provided default constructors, unless an
// empty initializer is explicitly given. Node.js still supports older
// clang versions, therefore we must take care when using const objects
// with default constructors. For more informations, please refer to CWG
// 253 (http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#253)
static const WasmSourceInformation singleEmptySourceInformation = {};
return singleEmptySourceInformation;
}
const String16 GetHash(v8::Isolate*, int index) override {
......
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