diff --git a/change/react-native-windows-d4179584-e159-44b9-b6fe-c1f4c00e8004.json b/change/react-native-windows-d4179584-e159-44b9-b6fe-c1f4c00e8004.json new file mode 100644 index 00000000000..46cdd680667 --- /dev/null +++ b/change/react-native-windows-d4179584-e159-44b9-b6fe-c1f4c00e8004.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Do not use Blob/FileReader modules on UWP", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Desktop.IntegrationTests/RNTesterIntegrationTests.cpp b/vnext/Desktop.IntegrationTests/RNTesterIntegrationTests.cpp index ea1183a6a96..0813355bf0a 100644 --- a/vnext/Desktop.IntegrationTests/RNTesterIntegrationTests.cpp +++ b/vnext/Desktop.IntegrationTests/RNTesterIntegrationTests.cpp @@ -28,6 +28,7 @@ TEST_MODULE_INITIALIZE(InitModule) { SetRuntimeOptionBool("WebSocket.AcceptSelfSigned", true); SetRuntimeOptionBool("UseBeastWebSocket", false); SetRuntimeOptionBool("Http.UseMonolithicModule", false); + SetRuntimeOptionBool("Blob.EnableModule", true); // WebSocketJSExecutor can't register native log hooks. SetRuntimeOptionBool("RNTester.UseWebDebugger", false); diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json index 0f5ab5eac44..e0b9ceaacbe 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json @@ -92,7 +92,7 @@ "NETStandard.Library": { "type": "Transitive", "resolved": "2.0.3", - "contentHash": "548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==", + "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", "dependencies": { "Microsoft.NETCore.Platforms": "1.1.0" } @@ -104,8 +104,8 @@ }, "ReactNative.Hermes.Windows": { "type": "Transitive", - "resolved": "0.11.0-ms.6", - "contentHash": "WAVLsSZBV4p/3hNC3W67su7xu3f/ZMSKxu0ON7g2GaKRbkJmH0Qyif1IlzcJwtvR48kuOdfgPu7Bgtz3AY+gqg==" + "resolved": "0.12.1", + "contentHash": "0yjt0Y2pNfqw7qUiV5Q3W8hZ2HuS3HiS135c/ILLXeRXLpQMmfq1NS3oBZ1oMZy94gSfgP9QZ/862T3qUTES1A==" }, "runtime.win10-arm.Microsoft.Net.Native.Compiler": { "type": "Transitive", @@ -315,7 +315,7 @@ "Microsoft.Windows.CppWinRT": "2.0.211028.7", "Microsoft.Windows.SDK.BuildTools": "10.0.22000.194", "ReactCommon": "1.0.0", - "ReactNative.Hermes.Windows": "0.11.0-ms.6", + "ReactNative.Hermes.Windows": "0.12.1", "boost": "1.76.0" } }, diff --git a/vnext/Microsoft.ReactNative.Managed/packages.lock.json b/vnext/Microsoft.ReactNative.Managed/packages.lock.json index decd73cbdce..2b88ab73c5f 100644 --- a/vnext/Microsoft.ReactNative.Managed/packages.lock.json +++ b/vnext/Microsoft.ReactNative.Managed/packages.lock.json @@ -83,15 +83,15 @@ "NETStandard.Library": { "type": "Transitive", "resolved": "2.0.3", - "contentHash": "548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==", + "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", "dependencies": { "Microsoft.NETCore.Platforms": "1.1.0" } }, "ReactNative.Hermes.Windows": { "type": "Transitive", - "resolved": "0.11.0-ms.6", - "contentHash": "WAVLsSZBV4p/3hNC3W67su7xu3f/ZMSKxu0ON7g2GaKRbkJmH0Qyif1IlzcJwtvR48kuOdfgPu7Bgtz3AY+gqg==" + "resolved": "0.12.1", + "contentHash": "0yjt0Y2pNfqw7qUiV5Q3W8hZ2HuS3HiS135c/ILLXeRXLpQMmfq1NS3oBZ1oMZy94gSfgP9QZ/862T3qUTES1A==" }, "runtime.win10-arm.Microsoft.Net.Native.Compiler": { "type": "Transitive", @@ -182,7 +182,7 @@ "Microsoft.Windows.CppWinRT": "2.0.211028.7", "Microsoft.Windows.SDK.BuildTools": "10.0.22000.194", "ReactCommon": "1.0.0", - "ReactNative.Hermes.Windows": "0.11.0-ms.6", + "ReactNative.Hermes.Windows": "0.12.1", "boost": "1.76.0" } }, diff --git a/vnext/Shared/OInstance.cpp b/vnext/Shared/OInstance.cpp index fc40263f557..c3357669ee6 100644 --- a/vnext/Shared/OInstance.cpp +++ b/vnext/Shared/OInstance.cpp @@ -618,17 +618,20 @@ std::vector> InstanceImpl::GetDefaultNativeModules []() { return std::make_unique(); }, nativeQueue)); - modules.push_back(std::make_unique( - m_innerInstance, - Microsoft::React::GetBlobModuleName(), - [transitionalProps]() { return Microsoft::React::CreateBlobModule(transitionalProps); }, - nativeQueue)); + // #10036 - Blob module not supported in UWP. Need to define property bag lifetime and onwership. + if (Microsoft::React::GetRuntimeOptionBool("Blob.EnableModule")) { + modules.push_back(std::make_unique( + m_innerInstance, + Microsoft::React::GetBlobModuleName(), + [transitionalProps]() { return Microsoft::React::CreateBlobModule(transitionalProps); }, + nativeQueue)); - modules.push_back(std::make_unique( - m_innerInstance, - Microsoft::React::GetFileReaderModuleName(), - [transitionalProps]() { return Microsoft::React::CreateFileReaderModule(transitionalProps); }, - nativeQueue)); + modules.push_back(std::make_unique( + m_innerInstance, + Microsoft::React::GetFileReaderModuleName(), + [transitionalProps]() { return Microsoft::React::CreateFileReaderModule(transitionalProps); }, + nativeQueue)); + } return modules; }