Browse Source

chore: update patches

deepak1556 10 months ago
parent
commit
e204e2712e

+ 1 - 1
patches/nan/.patches

@@ -1,5 +1,5 @@
 use_new_constructor_for_scriptorigin_when_17_x.patch
-api_remove_allcan_read_write.patch
 fix_define_nan_copyablepersistenttraits_for_v8_12_5.patch
 remove_deprecated_v8_isolate_idlenotificationdeadline.patch
 remove_several_apis_deprecated_in_version_12_6.patch
+api_remove_allcan_read_write.patch

+ 38 - 19
patches/nan/api_remove_allcan_read_write.patch

@@ -17,7 +17,7 @@ Steps for upstreaming this patch:
 - Upstream patch to nodejs/nan before Electron 29 is branched
 
 diff --git a/nan.h b/nan.h
-index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9e3e17e37 100644
+index 9a9112afe0cc94ce58ed3cce9763ace7c160a932..f4865a77e60d5105ed2426037984ddcbfa58bbca 100644
 --- a/nan.h
 +++ b/nan.h
 @@ -47,6 +47,7 @@
@@ -28,7 +28,7 @@ index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9
  
  #ifdef _MSC_VER
  # define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
-@@ -2517,7 +2518,9 @@ NAN_DEPRECATED inline void SetAccessor(
+@@ -2525,7 +2526,9 @@ NAN_DEPRECATED inline void SetAccessor(
    , GetterCallback getter
    , SetterCallback setter
    , v8::Local<v8::Value> data
@@ -38,7 +38,7 @@ index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9
    , v8::PropertyAttribute attribute
    , imp::Sig signature) {
    HandleScope scope;
-@@ -2545,17 +2548,28 @@ NAN_DEPRECATED inline void SetAccessor(
+@@ -2553,17 +2556,28 @@ NAN_DEPRECATED inline void SetAccessor(
      obj->SetInternalField(imp::kDataIndex, data);
    }
  
@@ -67,7 +67,7 @@ index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9
  }
  
  inline void SetAccessor(
-@@ -2564,7 +2578,9 @@ inline void SetAccessor(
+@@ -2572,7 +2586,9 @@ inline void SetAccessor(
    , GetterCallback getter
    , SetterCallback setter = 0
    , v8::Local<v8::Value> data = v8::Local<v8::Value>()
@@ -77,7 +77,7 @@ index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9
    , v8::PropertyAttribute attribute = v8::None) {
    HandleScope scope;
  
-@@ -2591,14 +2607,25 @@ inline void SetAccessor(
+@@ -2599,14 +2615,25 @@ inline void SetAccessor(
      obj->SetInternalField(imp::kDataIndex, data);
    }
  
@@ -103,7 +103,7 @@ index 2a68349448c163fa29af327a03b11678e61f5789..6c4fe9e46f69234100e7e634826b38c9
  }
  
  inline bool SetAccessor(
-@@ -2634,7 +2661,15 @@ inline bool SetAccessor(
+@@ -2642,7 +2669,15 @@ inline bool SetAccessor(
        , New<v8::External>(reinterpret_cast<void *>(setter)));
    }
  
@@ -140,23 +140,42 @@ index e6ad45737e2ac18da3fa936b1de618e7389933bc..025f5b66774c2f5fe0ccb98c91fc714d
 -  t.equal(settergetter.prop2, 'setting a new value')
  })
 diff --git a/test/js/methodswithdata-test.js b/test/js/methodswithdata-test.js
-index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..795538510431fb3b633be37f916d4ce1955c808a 100644
+index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..c3cb64799b6a6ad36d5c92fe7860314eb8a4da18 100644
 --- a/test/js/methodswithdata-test.js
 +++ b/test/js/methodswithdata-test.js
-@@ -16,7 +16,7 @@ test('SetMethod with data', function (t) {
- });
- 
- test('accessors with data', function (t) {
+@@ -13,13 +13,13 @@ const test     = require('tap').test
+ test('SetMethod with data', function (t) {
+     t.plan(1);
+     t.ok(bindings.testWithData());
+-});
+-
+-test('accessors with data', function (t) {
 -    t.plan(7)
+-    var settergetter = bindings.create()
+-    t.equal(settergetter.prop1, 'this is property 1')
+-    t.ok(settergetter.prop2 === '')
++});
++
++test('accessors with data', function (t) {
 +    t.plan(6)
-     var settergetter = bindings.create()
-     t.equal(settergetter.prop1, 'this is property 1')
-     t.ok(settergetter.prop2 === '')
-@@ -33,6 +33,5 @@ test('accessors with data', function (t) {
-     t.equal(derived.prop1, 'this is property 1')
-     derived.prop2 = 'setting a new value'
-     t.equal(derived.prop2, 'setting a new value')
++    var settergetter = bindings.create()
++    t.equal(settergetter.prop1, 'this is property 1')
++    t.ok(settergetter.prop2 === '')
+     settergetter.prop2 = 'setting a value'
+     t.equal(settergetter.prop2, 'setting a value')
+     t.equal(settergetter.log(),
+@@ -30,9 +30,8 @@ test('accessors with data', function (t) {
+       'Prop2:GETTER(setting a value)\n'
+     )
+     var derived = Object.create(settergetter)
+-    t.equal(derived.prop1, 'this is property 1')
+-    derived.prop2 = 'setting a new value'
+-    t.equal(derived.prop2, 'setting a new value')
 -    t.equal(settergetter.prop2, 'setting a new value')
-   })
+-  })
++    t.equal(derived.prop1, 'this is property 1')
++    derived.prop2 = 'setting a new value'
++    t.equal(derived.prop2, 'setting a new value')
++  })
    
 \ No newline at end of file

+ 2 - 2
patches/nan/fix_define_nan_copyablepersistenttraits_for_v8_12_5.patch

@@ -7,10 +7,10 @@ Refs https://chromium-review.googlesource.com/c/v8/v8/+/5403708
 Should be upstreamed.
 
 diff --git a/nan.h b/nan.h
-index 6c4fe9e46f69234100e7e634826b38c9e3e17e37..a2c84afb9be624fb1a974563cd8335a87f98f2cd 100644
+index 2a68349448c163fa29af327a03b11678e61f5789..42285328055ddb7c76548258f3c4847d2c278ad6 100644
 --- a/nan.h
 +++ b/nan.h
-@@ -204,9 +204,11 @@ typedef v8::String::ExternalOneByteStringResource
+@@ -203,9 +203,11 @@ typedef v8::String::ExternalOneByteStringResource
  template<typename T>
  class NonCopyablePersistentTraits :
      public v8::NonCopyablePersistentTraits<T> {};

+ 2 - 2
patches/nan/remove_deprecated_v8_isolate_idlenotificationdeadline.patch

@@ -8,10 +8,10 @@ See https://chromium-review.googlesource.com/c/v8/v8/+/5539852
 Also https://github.com/nodejs/nan/issues/953#issuecomment-1791163429
 
 diff --git a/nan.h b/nan.h
-index a2c84afb9be624fb1a974563cd8335a87f98f2cd..f4865a77e60d5105ed2426037984ddcbfa58bbca 100644
+index 42285328055ddb7c76548258f3c4847d2c278ad6..9a9112afe0cc94ce58ed3cce9763ace7c160a932 100644
 --- a/nan.h
 +++ b/nan.h
-@@ -685,7 +685,13 @@ inline uv_loop_t* GetCurrentEventLoop() {
+@@ -684,7 +684,13 @@ inline uv_loop_t* GetCurrentEventLoop() {
      v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb);
    }
  

+ 1 - 1
shell/browser/feature_list.cc

@@ -20,7 +20,7 @@
 
 #if BUILDFLAG(IS_MAC)
 #include "content/common/features.h"  // nogncheck
-#include "device/base/features.h"  // nogncheck
+#include "device/base/features.h"     // nogncheck
 #endif
 
 namespace electron {