Merge "nativewindow: report errors on error to allocate a handle"