Commit b0a1fb7
committed
[Win32] Fix faulty HRESULT_FROM_WIN32 comparison in Edge
Edge compares the result of WebView initialization with an HRESULT
created from a Windows error code via the HRESULT_FROM_WIN32 macro. The
actual result in that initialization callback is a long while the
HRESULT returned from the macro is represented as integer in SWT. The
current comparison of long and integer does not take into account that
the values are signed. In this specific case, the actual HRESULT to
compare against is 2147947423 while the HRESULT_FROM_WIN32 macro returns
the signed value -2147019873. The actual result needs to be converted
into a signed integer as well, as otherwise it will be considered as
2147947423, thus never matching the expected HRESULT value.
This change converts the processed result into an integer to correct the
comparison.1 parent 3e45b23 commit b0a1fb7
File tree
1 file changed
+5
-4
lines changed- bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser
1 file changed
+5
-4
lines changedLines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
| 605 | + | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| |||
611 | 612 | | |
612 | 613 | | |
613 | 614 | | |
614 | | - | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | | - | |
| 618 | + | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
621 | | - | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
0 commit comments