Merge lp://qastaging/~mardy/webbrowser-app/creation-mode into lp://qastaging/webbrowser-app

Proposed by Alberto Mardegan
Status: Rejected
Rejected by: Alberto Mardegan
Proposed branch: lp://qastaging/~mardy/webbrowser-app/creation-mode
Merge into: lp://qastaging/webbrowser-app
Prerequisite: lp://qastaging/~mardy/webbrowser-app/oa-runtime
Diff against target: 115 lines (+26/-5)
4 files modified
src/app/browserapplication.cpp (+7/-2)
src/app/browserapplication.h (+8/-2)
src/app/webcontainer/sqlitecookiestore.cpp (+8/-0)
src/app/webcontainer/webapp-container.cpp (+3/-1)
To merge this branch: bzr merge lp://qastaging/~mardy/webbrowser-app/creation-mode
Reviewer Review Type Date Requested Status
Alexandre Abreu (community) Approve
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+209672@code.qastaging.launchpad.net

Commit message

Don't load the webview as soon as a webapp starts

The code in webapp-container.qml initially checks the value of its
"accountProvider" property and loads the webview if that's empty.
If this property is set after the component has been built, this will cause the
webview to be (accidentally) loaded for a fraction of a second, which in turn
will cause the WebProcess to be spawned. The WebProcess will read the
cookies.db file, and the same WebProcess instance will likely be reused for the
webapp, once we really want to use it. This has the unfortunate side-effect
that it will not re-read the cookies which we might have copied over from
Online Accounts in the meantime.

So, with this change we make sure that all properties (including
"accountProvider") will be set on the Window before the component is completed.

Description of the change

Don't load the webview as soon as a webapp starts

The code in webapp-container.qml initially checks the value of its
"accountProvider" property and loads the webview if that's empty.
If this property is set after the component has been built, this will cause the
webview to be (accidentally) loaded for a fraction of a second, which in turn
will cause the WebProcess to be spawned. The WebProcess will read the
cookies.db file, and the same WebProcess instance will likely be reused for the
webapp, once we really want to use it. This has the unfortunate side-effect
that it will not re-read the cookies which we might have copied over from
Online Accounts in the meantime.

So, with this change we make sure that all properties (including
"accountProvider") will be set on the Window before the component is completed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

L87: can you explain?

review: Needs Information
Revision history for this message
Alberto Mardegan (mardy) wrote :

I initialize QDir with the full path of the DB file (e.g., "/path/to/cookies.db"). QDir doesn't require it to be an existing one, so this step succeeds. Then I create the ".." directory, that is "/path/to/cookies.db/..", which resolves to "/path/to/".

Revision history for this message
Alexandre Abreu (abreu-alexandre) :
review: Approve
Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Alberto Mardegan (mardy) wrote :

> This MR is superseded by https://code.launchpad.net/~mardy/webbrowser-app/add-
> onlineaccount-support-for-container2/+merge/211701, isn’t it?

Oh, indeed it is.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: