Hi,
Our android app (customized browser) is built on top of XWalk 11 release.
We found issue on our browser that multiple messages are received (probably
due to URL redirect) that triggers receiving multiple
onPageLoadStopped/onPageLoadFinished calls per URL visit.

That leads to getting into our code for storing search history multiple
times per URL visit.

We dig into XWalk source code and found the following comments  from the
java file
"xwalk/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkContentsClientBridge.java".

Per inline comments, is the issue above expected? If so, is there
workaround?

341     public void onPageFinished(String url) {
342         if (!isOwnerActivityRunning()) return;
343         if (mPageLoadListener != null)
mPageLoadListener.onPageFinished(url);
344         if (mXWalkUIClient != null) {
345             if (mLoadStatus == LoadStatusInternal.CANCELLED &&
mLoadingUrl != null) {
346                 mXWalkUIClient.onPageLoadStopped(mXWalkView,
mLoadingUrl, mLoadStatus);
347             } else {
348                 mXWalkUIClient.onPageLoadStopped(mXWalkView, url,
mLoadStatus);
349             }
350             mLoadingUrl = null;
351         }
352
353         // This isn't the accurate point to notify a resource loading
is finished,
354         // but it's a workable way. We could enhance this by extending
Content
355         // API in future if we have the demand.
356         onResourceLoadFinished(url);
357     }


Many thanks!
-Wei
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to