Skip to content

Commit 068824d

Browse files
joaocgreistargos
authored andcommitted
deps: make v8.h compatible with VS2015
There is a bug in the most recent version of VS2015 that affects v8.h and therefore prevents compilation of addons. Refs: https://stackoverflow.com/q/38378693 PR-URL: #32116 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 54f4f1a commit 068824d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.3',
39+
'v8_embedder_string': '-node.4',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/include/v8.h

+6
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,9 @@ class ScriptOriginOptions {
14401440
*/
14411441
class ScriptOrigin {
14421442
public:
1443+
#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */
14431444
V8_DEPRECATE_SOON("Use constructor with primitive C++ types")
1445+
#endif
14441446
V8_INLINE explicit ScriptOrigin(
14451447
Local<Value> resource_name, Local<Integer> resource_line_offset,
14461448
Local<Integer> resource_column_offset,
@@ -1451,7 +1453,9 @@ class ScriptOrigin {
14511453
Local<Boolean> is_wasm = Local<Boolean>(),
14521454
Local<Boolean> is_module = Local<Boolean>(),
14531455
Local<PrimitiveArray> host_defined_options = Local<PrimitiveArray>());
1456+
#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */
14541457
V8_DEPRECATE_SOON("Use constructor that takes an isolate")
1458+
#endif
14551459
V8_INLINE explicit ScriptOrigin(
14561460
Local<Value> resource_name, int resource_line_offset = 0,
14571461
int resource_column_offset = 0,
@@ -1953,9 +1957,11 @@ class V8_EXPORT ScriptCompiler {
19531957
public:
19541958
enum Encoding { ONE_BYTE, TWO_BYTE, UTF8, WINDOWS_1252 };
19551959

1960+
#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */
19561961
V8_DEPRECATED(
19571962
"This class takes ownership of source_stream, so use the constructor "
19581963
"taking a unique_ptr to make these semantics clearer")
1964+
#endif
19591965
StreamedSource(ExternalSourceStream* source_stream, Encoding encoding);
19601966
StreamedSource(std::unique_ptr<ExternalSourceStream> source_stream,
19611967
Encoding encoding);

0 commit comments

Comments
 (0)