Index: ui/gfx/render_text_win.cc |
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc |
index 182c9adab1f15f18ed3d67d7bcdaf98b3a002c6b..b12b563c752ae5acaba91a00103fac3850503a8f 100644 |
--- a/ui/gfx/render_text_win.cc |
+++ b/ui/gfx/render_text_win.cc |
@@ -117,18 +117,23 @@ RenderTextWin::RenderTextWin() |
string_width_(0), |
needs_layout_(false) { |
// Omitting default constructors for script_* would leave POD uninitialized. |
- HRESULT hr = 0; |
+ HRESULT hr = S_OK; |
// TODO(msw): Call ScriptRecordDigitSubstitution on WM_SETTINGCHANGE message. |
// TODO(msw): Use Chrome/profile locale/language settings? |
hr = ScriptRecordDigitSubstitution(LOCALE_USER_DEFAULT, &digit_substitute_); |
- DCHECK(SUCCEEDED(hr)); |
+ if (FAILED(hr)) { |
+ LOG(WARNING) << "ScriptRecordDigitSubstitution failed " << hr |
vandebo (ex-Chrome)
2012/02/03 18:36:45
Is it because of the sandbox? Does that mean this
|
+ << ", possibly because of sandbox."; |
+ } |
- hr = ScriptApplyDigitSubstitution(&digit_substitute_, |
- &script_control_, |
- &script_state_); |
- DCHECK(SUCCEEDED(hr)); |
- script_control_.fMergeNeutralItems = true; |
+ if (SUCCEEDED(hr)) { |
+ hr = ScriptApplyDigitSubstitution(&digit_substitute_, |
vandebo (ex-Chrome)
2012/02/03 18:36:45
Why is is ok to not so this in the sandbox?
|
+ &script_control_, |
+ &script_state_); |
+ DCHECK(SUCCEEDED(hr)); |
+ script_control_.fMergeNeutralItems = true; |
+ } |
MoveCursorTo(EdgeSelectionModel(CURSOR_LEFT)); |
} |