Skip to content

Commit eae3fa0

Browse files
committed
fix(smol): recreate inspector protocol Windows patch with correct format
- Create patch from actual Node.js source using diff -u - Properly formats all added lines with + prefix - Tested with patch -p1 --dry-run, applies cleanly - Fixes AttributeError: 'X' object has no attribute 'path' - Adds fallback to compute protocol path from config file location Refs: #876
1 parent e4bef21 commit eae3fa0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/node-smol-builder/patches/012-socketsecurity_fix_inspector_protocol_windows_v24.10.0.patch

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@
2727
# - Node.js v24 gyp build system Windows argument passing
2828
# - tools/v8_gypfiles/v8.gyp protocol_generated_sources action
2929

30-
diff --git a/deps/v8/third_party/inspector_protocol/code_generator.py b/deps/v8/third_party/inspector_protocol/code_generator.py
31-
index b1bedb58..c702516a 100755
3230
--- a/deps/v8/third_party/inspector_protocol/code_generator.py
3331
+++ b/deps/v8/third_party/inspector_protocol/code_generator.py
34-
@@ -604,8 +604,20 @@ class Protocol(object):
32+
@@ -604,6 +604,19 @@
3533
def main():
3634
jinja_dir, config_file, config = read_config()
37-
38-
- protocol = Protocol(config)
35+
3936
+ # Windows gyp-win-tool may fail to pass --config_value correctly.
4037
+ # Fall back to computing the path from the config file location.
4138
+ if not hasattr(config.protocol, 'path'):
@@ -48,8 +45,7 @@ index b1bedb58..c702516a 100755
4845
+ config = config._replace(protocol=protocol_obj) if hasattr(config, '_replace') else config
4946
+ else:
5047
+ raise Exception("config.protocol.path not set and config_file not provided")
51-
52-
+ protocol = Protocol(config)
5348
+
49+
protocol = Protocol(config)
50+
5451
if not config.exported and len(protocol.exported_domains):
55-
sys.stderr.write(("Domains [%s] are exported, but config is missing export "

0 commit comments

Comments
 (0)