summaryrefslogtreecommitdiff
path: root/chromium/v8/include
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-05 17:15:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 07:47:18 +0000
commit7324afb043a0b1e623d8e8eb906cdc53bdeb4685 (patch)
treea3fe2d74ea9c9e142c390dac4ca0e219382ace46 /chromium/v8/include
parent6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (diff)
downloadqtwebengine-chromium-7324afb043a0b1e623d8e8eb906cdc53bdeb4685.tar.gz
BASELINE: Update Chromium to 58.0.3029.54
Change-Id: I67f57065a7afdc8e4614adb5c0230281428df4d1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/v8/include')
-rw-r--r--chromium/v8/include/v8-debug.h57
-rw-r--r--chromium/v8/include/v8-inspector.h8
-rw-r--r--chromium/v8/include/v8-profiler.h24
-rw-r--r--chromium/v8/include/v8-util.h3
-rw-r--r--chromium/v8/include/v8-version.h6
-rw-r--r--chromium/v8/include/v8.h116
6 files changed, 119 insertions, 95 deletions
diff --git a/chromium/v8/include/v8-debug.h b/chromium/v8/include/v8-debug.h
index 777b8aaa3e6..797d23314e2 100644
--- a/chromium/v8/include/v8-debug.h
+++ b/chromium/v8/include/v8-debug.h
@@ -116,9 +116,7 @@ class V8_EXPORT Debug {
virtual Local<Value> GetCallbackData() const = 0;
/**
- * Client data passed to DebugBreakForCommand function. The
- * debugger takes ownership of the data and will delete it even if
- * there is no message handler.
+ * This is now a dummy that returns nullptr.
*/
virtual ClientData* GetClientData() const = 0;
@@ -132,23 +130,18 @@ class V8_EXPORT Debug {
*
* \param event_details object providing information about the debug event
*
- * A EventCallback2 does not take possession of the event data,
+ * A EventCallback does not take possession of the event data,
* and must not rely on the data persisting after the handler returns.
*/
typedef void (*EventCallback)(const EventDetails& event_details);
/**
- * Debug message callback function.
- *
- * \param message the debug message handler message object
- *
- * A MessageHandler does not take possession of the message data,
- * and must not rely on the data persisting after the handler returns.
+ * This is now a no-op.
*/
typedef void (*MessageHandler)(const Message& message);
/**
- * Callback function for the host to ensure debug messages are processed.
+ * This is now a no-op.
*/
typedef void (*DebugMessageDispatchHandler)();
@@ -167,11 +160,12 @@ class V8_EXPORT Debug {
V8_DEPRECATED("No longer supported",
static bool CheckDebugBreak(Isolate* isolate));
- // Message based interface. The message protocol is JSON.
+ // This is now a no-op.
V8_DEPRECATED("No longer supported",
static void SetMessageHandler(Isolate* isolate,
MessageHandler handler));
+ // This is now a no-op.
V8_DEPRECATED("No longer supported",
static void SendCommand(Isolate* isolate,
const uint16_t* command, int length,
@@ -200,44 +194,7 @@ class V8_EXPORT Debug {
v8::Local<v8::Function> fun,
Local<Value> data = Local<Value>());
- /**
- * Returns a mirror object for the given object.
- */
- V8_DEPRECATED("No longer supported",
- static MaybeLocal<Value> GetMirror(Local<Context> context,
- v8::Local<v8::Value> obj));
-
- /**
- * Makes V8 process all pending debug messages.
- *
- * From V8 point of view all debug messages come asynchronously (e.g. from
- * remote debugger) but they all must be handled synchronously: V8 cannot
- * do 2 things at one time so normal script execution must be interrupted
- * for a while.
- *
- * Generally when message arrives V8 may be in one of 3 states:
- * 1. V8 is running script; V8 will automatically interrupt and process all
- * pending messages;
- * 2. V8 is suspended on debug breakpoint; in this state V8 is dedicated
- * to reading and processing debug messages;
- * 3. V8 is not running at all or has called some long-working C++ function;
- * by default it means that processing of all debug messages will be deferred
- * until V8 gets control again; however, embedding application may improve
- * this by manually calling this method.
- *
- * Technically this method in many senses is equivalent to executing empty
- * script:
- * 1. It does nothing except for processing all pending debug messages.
- * 2. It should be invoked with the same precautions and from the same context
- * as V8 script would be invoked from, because:
- * a. with "evaluate" command it can do whatever normal script can do,
- * including all native calls;
- * b. no other thread should call V8 while this method is running
- * (v8::Locker may be used here).
- *
- * "Evaluate" debug command behavior currently is not specified in scope
- * of this method.
- */
+ // This is now a no-op.
V8_DEPRECATED("No longer supported",
static void ProcessDebugMessages(Isolate* isolate));
diff --git a/chromium/v8/include/v8-inspector.h b/chromium/v8/include/v8-inspector.h
index d0925adba04..c7209ed69ae 100644
--- a/chromium/v8/include/v8-inspector.h
+++ b/chromium/v8/include/v8-inspector.h
@@ -85,6 +85,8 @@ class V8_EXPORT V8ContextInfo {
StringView auxData;
bool hasMemoryOnConsole;
+ static int executionContextId(v8::Local<v8::Context> context);
+
private:
// Disallow copying and allocating this one.
enum NotNullTagEnum { NotNullLiteral };
@@ -156,8 +158,6 @@ class V8_EXPORT V8InspectorSession {
virtual void releaseObjectGroup(const StringView&) = 0;
};
-enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError };
-
class V8_EXPORT V8InspectorClient {
public:
virtual ~V8InspectorClient() {}
@@ -189,7 +189,8 @@ class V8_EXPORT V8InspectorClient {
virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>,
v8::Local<v8::Object>) {}
- virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType,
+ virtual void consoleAPIMessage(int contextGroupId,
+ v8::Isolate::MessageErrorLevel level,
const StringView& message,
const StringView& url, unsigned lineNumber,
unsigned columnNumber, V8StackTrace*) {}
@@ -201,6 +202,7 @@ class V8_EXPORT V8InspectorClient {
virtual void consoleTime(const StringView& title) {}
virtual void consoleTimeEnd(const StringView& title) {}
virtual void consoleTimeStamp(const StringView& title) {}
+ virtual void consoleClear(int contextGroupId) {}
virtual double currentTimeMS() { return 0; }
typedef void (*TimerCallback)(void*);
virtual void startRepeatingTimer(double, TimerCallback, void* data) {}
diff --git a/chromium/v8/include/v8-profiler.h b/chromium/v8/include/v8-profiler.h
index 74c0613946d..f7d182f8021 100644
--- a/chromium/v8/include/v8-profiler.h
+++ b/chromium/v8/include/v8-profiler.h
@@ -5,6 +5,7 @@
#ifndef V8_V8_PROFILER_H_
#define V8_V8_PROFILER_H_
+#include <unordered_set>
#include <vector>
#include "v8.h" // NOLINT(build/include)
@@ -392,8 +393,7 @@ class V8_EXPORT HeapGraphNode {
// snapshot items together.
kConsString = 10, // Concatenated string. A pair of pointers to strings.
kSlicedString = 11, // Sliced string. A fragment of another string.
- kSymbol = 12, // A Symbol (ES6).
- kSimdValue = 13 // A SIMD value stored in the heap (Proposed ES7).
+ kSymbol = 12 // A Symbol (ES6).
};
/** Returns node type (see HeapGraphNode::Type). */
@@ -630,6 +630,24 @@ class V8_EXPORT HeapProfiler {
kSamplingForceGC = 1 << 0,
};
+ typedef std::unordered_set<const v8::PersistentBase<v8::Value>*>
+ RetainerChildren;
+ typedef std::vector<std::pair<v8::RetainedObjectInfo*, RetainerChildren>>
+ RetainerGroups;
+ typedef std::vector<std::pair<const v8::PersistentBase<v8::Value>*,
+ const v8::PersistentBase<v8::Value>*>>
+ RetainerEdges;
+
+ struct RetainerInfos {
+ RetainerGroups groups;
+ RetainerEdges edges;
+ };
+
+ /**
+ * Callback function invoked to retrieve all RetainerInfos from the embedder.
+ */
+ typedef RetainerInfos (*GetRetainerInfosCallback)(v8::Isolate* isolate);
+
/**
* Callback function invoked for obtaining RetainedObjectInfo for
* the given JavaScript wrapper object. It is prohibited to enter V8
@@ -782,6 +800,8 @@ class V8_EXPORT HeapProfiler {
uint16_t class_id,
WrapperInfoCallback callback);
+ void SetGetRetainerInfosCallback(GetRetainerInfosCallback callback);
+
/**
* Default value of persistent handle class ID. Must not be used to
* define a class. Can be used to reset a class of a persistent
diff --git a/chromium/v8/include/v8-util.h b/chromium/v8/include/v8-util.h
index 8133fdd49dc..a04a5e84f80 100644
--- a/chromium/v8/include/v8-util.h
+++ b/chromium/v8/include/v8-util.h
@@ -6,6 +6,7 @@
#define V8_UTIL_H_
#include "v8.h" // NOLINT(build/include)
+#include <assert.h>
#include <map>
#include <vector>
@@ -210,7 +211,7 @@ class PersistentValueMapBase {
* key.
*/
void RegisterExternallyReferencedObject(K& key) {
- DCHECK(Contains(key));
+ assert(Contains(key));
V8::RegisterExternallyReferencedObject(
reinterpret_cast<internal::Object**>(FromVal(Traits::Get(&impl_, key))),
reinterpret_cast<internal::Isolate*>(GetIsolate()));
diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h
index 312d7d497ba..f61c13da07e 100644
--- a/chromium/v8/include/v8-version.h
+++ b/chromium/v8/include/v8-version.h
@@ -9,9 +9,9 @@
// NOTE these macros are used by some of the tool scripts and the build
// system so their names cannot be changed without changing the scripts.
#define V8_MAJOR_VERSION 5
-#define V8_MINOR_VERSION 7
-#define V8_BUILD_NUMBER 492
-#define V8_PATCH_LEVEL 72
+#define V8_MINOR_VERSION 8
+#define V8_BUILD_NUMBER 283
+#define V8_PATCH_LEVEL 24
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/chromium/v8/include/v8.h b/chromium/v8/include/v8.h
index b513c7f1f37..baf44170f03 100644
--- a/chromium/v8/include/v8.h
+++ b/chromium/v8/include/v8.h
@@ -962,20 +962,31 @@ class V8_EXPORT Data {
class ScriptOriginOptions {
public:
V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin = false,
- bool is_opaque = false, bool is_wasm = false)
+ bool is_opaque = false, bool is_wasm = false,
+ bool is_module = false)
: flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
- (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0)) {}
+ (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0) |
+ (is_module ? kIsModule : 0)) {}
V8_INLINE ScriptOriginOptions(int flags)
- : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque | kIsWasm)) {}
+ : flags_(flags &
+ (kIsSharedCrossOrigin | kIsOpaque | kIsWasm | kIsModule)) {}
+
bool IsSharedCrossOrigin() const {
return (flags_ & kIsSharedCrossOrigin) != 0;
}
bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; }
bool IsWasm() const { return (flags_ & kIsWasm) != 0; }
+ bool IsModule() const { return (flags_ & kIsModule) != 0; }
+
int Flags() const { return flags_; }
private:
- enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1, kIsWasm = 1 << 2 };
+ enum {
+ kIsSharedCrossOrigin = 1,
+ kIsOpaque = 1 << 1,
+ kIsWasm = 1 << 2,
+ kIsModule = 1 << 3
+ };
const int flags_;
};
@@ -992,7 +1003,8 @@ class ScriptOrigin {
Local<Integer> script_id = Local<Integer>(),
Local<Value> source_map_url = Local<Value>(),
Local<Boolean> resource_is_opaque = Local<Boolean>(),
- Local<Boolean> is_wasm = Local<Boolean>());
+ Local<Boolean> is_wasm = Local<Boolean>(),
+ Local<Boolean> is_module = Local<Boolean>());
V8_INLINE Local<Value> ResourceName() const;
V8_INLINE Local<Integer> ResourceLineOffset() const;
@@ -1183,6 +1195,8 @@ class V8_EXPORT ScriptCompiler {
// alive.
V8_INLINE const CachedData* GetCachedData() const;
+ V8_INLINE const ScriptOriginOptions& GetResourceOptions() const;
+
// Prevent copying.
Source(const Source&) = delete;
Source& operator=(const Source&) = delete;
@@ -1425,7 +1439,7 @@ class V8_EXPORT ScriptCompiler {
private:
static V8_WARN_UNUSED_RESULT MaybeLocal<UnboundScript> CompileUnboundInternal(
- Isolate* isolate, Source* source, CompileOptions options, bool is_module);
+ Isolate* isolate, Source* source, CompileOptions options);
};
@@ -1726,6 +1740,10 @@ class V8_EXPORT ValueSerializer {
* Allocates memory for the buffer of at least the size provided. The actual
* size (which may be greater or equal) is written to |actual_size|. If no
* buffer has been allocated yet, nullptr will be provided.
+ *
+ * If the memory cannot be allocated, nullptr should be returned.
+ * |actual_size| will be ignored. It is assumed that |old_buffer| is still
+ * valid in this case and has not been modified.
*/
virtual void* ReallocateBufferMemory(void* old_buffer, size_t size,
size_t* actual_size);
@@ -1767,7 +1785,7 @@ class V8_EXPORT ValueSerializer {
/*
* Marks an ArrayBuffer as havings its contents transferred out of band.
- * Pass the corresponding JSArrayBuffer in the deserializing context to
+ * Pass the corresponding ArrayBuffer in the deserializing context to
* ValueDeserializer::TransferArrayBuffer.
*/
void TransferArrayBuffer(uint32_t transfer_id,
@@ -1782,6 +1800,15 @@ class V8_EXPORT ValueSerializer {
Local<SharedArrayBuffer> shared_array_buffer));
/*
+ * Indicate whether to treat ArrayBufferView objects as host objects,
+ * i.e. pass them to Delegate::WriteHostObject. This should not be
+ * called when no Delegate was passed.
+ *
+ * The default is not to treat ArrayBufferViews as host objects.
+ */
+ void SetTreatArrayBufferViewsAsHostObjects(bool mode);
+
+ /*
* Write raw data in various common formats to the buffer.
* Note that integer types are written in base-128 varint format, not with a
* binary copy. For use during an override of Delegate::WriteHostObject.
@@ -2146,12 +2173,6 @@ class V8_EXPORT Value : public Data {
bool IsFloat64Array() const;
/**
- * Returns true if this value is a SIMD Float32x4.
- * This is an experimental feature.
- */
- bool IsFloat32x4() const;
-
- /**
* Returns true if this value is a DataView.
*/
bool IsDataView() const;
@@ -2313,7 +2334,7 @@ class V8_EXPORT String : public Name {
enum Encoding {
UNKNOWN_ENCODING = 0x1,
TWO_BYTE_ENCODING = 0x0,
- ONE_BYTE_ENCODING = 0x4
+ ONE_BYTE_ENCODING = 0x8
};
/**
* Returns the number of characters in this string.
@@ -2429,6 +2450,7 @@ class V8_EXPORT String : public Name {
private:
friend class internal::Heap;
+ friend class v8::String;
};
/**
@@ -4600,8 +4622,11 @@ class V8_EXPORT External : public Value {
static void CheckCast(v8::Value* obj);
};
-
-#define V8_INTRINSICS_LIST(F) F(ArrayProto_values, array_values_iterator)
+#define V8_INTRINSICS_LIST(F) \
+ F(ArrayProto_entries, array_entries_iterator) \
+ F(ArrayProto_forEach, array_for_each_iterator) \
+ F(ArrayProto_keys, array_keys_iterator) \
+ F(ArrayProto_values, array_values_iterator)
enum Intrinsic {
#define V8_DECL_INTRINSIC(name, iname) k##name,
@@ -6347,7 +6372,8 @@ class V8_EXPORT Isolate {
create_histogram_callback(nullptr),
add_histogram_sample_callback(nullptr),
array_buffer_allocator(nullptr),
- external_references(nullptr) {}
+ external_references(nullptr),
+ allow_atomics_wait(true) {}
/**
* The optional entry_hook allows the host application to provide the
@@ -6403,6 +6429,12 @@ class V8_EXPORT Isolate {
* entire lifetime of the isolate.
*/
intptr_t* external_references;
+
+ /**
+ * Whether calling Atomics.wait (a function that may block) is allowed in
+ * this isolate.
+ */
+ bool allow_atomics_wait;
};
@@ -6777,6 +6809,14 @@ class V8_EXPORT Isolate {
Local<Context> GetEnteredContext();
/**
+ * Returns either the last context entered through V8's C++ API, or the
+ * context of the currently running microtask while processing microtasks.
+ * If a context is entered while executing a microtask, that context is
+ * returned.
+ */
+ Local<Context> GetEnteredOrMicrotaskContext();
+
+ /**
* Schedules an exception to be thrown when returning to JavaScript. When an
* exception has been scheduled it is illegal to invoke any JavaScript
* operation; the caller must return immediately and only after the exception
@@ -6796,9 +6836,9 @@ class V8_EXPORT Isolate {
* for partially dependent handles only.
*/
template <typename T>
- V8_DEPRECATE_SOON("Use EmbedderHeapTracer",
- void SetObjectGroupId(const Persistent<T>& object,
- UniqueId id));
+ V8_DEPRECATED("Use EmbedderHeapTracer",
+ void SetObjectGroupId(const Persistent<T>& object,
+ UniqueId id));
/**
* Allows the host application to declare implicit references from an object
@@ -6808,9 +6848,9 @@ class V8_EXPORT Isolate {
* callback function.
*/
template <typename T>
- V8_DEPRECATE_SOON("Use EmbedderHeapTracer",
- void SetReferenceFromGroup(UniqueId id,
- const Persistent<T>& child));
+ V8_DEPRECATED("Use EmbedderHeapTracer",
+ void SetReferenceFromGroup(UniqueId id,
+ const Persistent<T>& child));
/**
* Allows the host application to declare implicit references from an object
@@ -6819,9 +6859,9 @@ class V8_EXPORT Isolate {
* is intended to be used in the before-garbage-collection callback function.
*/
template <typename T, typename S>
- V8_DEPRECATE_SOON("Use EmbedderHeapTracer",
- void SetReference(const Persistent<T>& parent,
- const Persistent<S>& child));
+ V8_DEPRECATED("Use EmbedderHeapTracer",
+ void SetReference(const Persistent<T>& parent,
+ const Persistent<S>& child));
typedef void (*GCCallback)(Isolate* isolate, GCType type,
GCCallbackFlags flags);
@@ -8463,10 +8503,10 @@ class Internals {
static const int kFixedArrayHeaderSize = 2 * kApiPointerSize;
static const int kContextHeaderSize = 2 * kApiPointerSize;
static const int kContextEmbedderDataIndex = 5;
- static const int kFullStringRepresentationMask = 0x07;
- static const int kStringEncodingMask = 0x4;
+ static const int kFullStringRepresentationMask = 0x0f;
+ static const int kStringEncodingMask = 0x8;
static const int kExternalTwoByteRepresentationTag = 0x02;
- static const int kExternalOneByteRepresentationTag = 0x06;
+ static const int kExternalOneByteRepresentationTag = 0x0a;
static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize;
static const int kExternalMemoryOffset = 4 * kApiPointerSize;
@@ -8491,11 +8531,11 @@ class Internals {
static const int kNodeIsIndependentShift = 3;
static const int kNodeIsActiveShift = 4;
- static const int kJSApiObjectType = 0xbb;
- static const int kJSObjectType = 0xbc;
+ static const int kJSApiObjectType = 0xb9;
+ static const int kJSObjectType = 0xba;
static const int kFirstNonstringType = 0x80;
- static const int kOddballType = 0x83;
- static const int kForeignType = 0x87;
+ static const int kOddballType = 0x82;
+ static const int kForeignType = 0x86;
static const int kUndefinedOddballKind = 5;
static const int kNullOddballKind = 3;
@@ -9013,14 +9053,15 @@ ScriptOrigin::ScriptOrigin(Local<Value> resource_name,
Local<Integer> script_id,
Local<Value> source_map_url,
Local<Boolean> resource_is_opaque,
- Local<Boolean> is_wasm)
+ Local<Boolean> is_wasm, Local<Boolean> is_module)
: resource_name_(resource_name),
resource_line_offset_(resource_line_offset),
resource_column_offset_(resource_column_offset),
options_(!resource_is_shared_cross_origin.IsEmpty() &&
resource_is_shared_cross_origin->IsTrue(),
!resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue(),
- !is_wasm.IsEmpty() && is_wasm->IsTrue()),
+ !is_wasm.IsEmpty() && is_wasm->IsTrue(),
+ !is_module.IsEmpty() && is_module->IsTrue()),
script_id_(script_id),
source_map_url_(source_map_url) {}
@@ -9069,13 +9110,16 @@ const ScriptCompiler::CachedData* ScriptCompiler::Source::GetCachedData()
return cached_data;
}
+const ScriptOriginOptions& ScriptCompiler::Source::GetResourceOptions() const {
+ return resource_options;
+}
Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
return value ? True(isolate) : False(isolate);
}
void Template::Set(Isolate* isolate, const char* name, Local<Data> value) {
- Set(String::NewFromUtf8(isolate, name, NewStringType::kNormal)
+ Set(String::NewFromUtf8(isolate, name, NewStringType::kInternalized)
.ToLocalChecked(),
value);
}