Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/Platform.java

Issue 29556582: Issue 5643 - Make v8::Isolate injectable into JsEngine (Closed)
Patch Set: Using JniLongToTypePtr for casting Created Sept. 28, 2017, 8:55 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 27 matching lines...) Expand all
38 { 38 {
39 this(ctor(logSystem, webRequest, basePath)); 39 this(ctor(logSystem, webRequest, basePath));
40 } 40 }
41 41
42 protected Platform(final long ptr) 42 protected Platform(final long ptr)
43 { 43 {
44 this.ptr = ptr; 44 this.ptr = ptr;
45 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); 45 this.disposer = new Disposer(this, new DisposeWrapper(ptr));
46 } 46 }
47 47
48 public void setUpJsEngine(final AppInfo appInfo, final long v8IsolatePtr)
49 {
50 setUpJsEngine(this.ptr, appInfo, v8IsolatePtr);
51 }
52
48 public void setUpJsEngine(final AppInfo appInfo) 53 public void setUpJsEngine(final AppInfo appInfo)
49 { 54 {
50 setUpJsEngine(this.ptr, appInfo); 55 setUpJsEngine(appInfo, 0L);
51 } 56 }
52 57
53 public JsEngine getJsEngine() 58 public JsEngine getJsEngine()
54 { 59 {
55 return new JsEngine(getJsEnginePtr(this.ptr)); 60 return new JsEngine(getJsEnginePtr(this.ptr));
56 } 61 }
57 62
58 public void setUpFilterEngine(final IsAllowedConnectionCallback isSubscription DownloadAllowedCallback) 63 public void setUpFilterEngine(final IsAllowedConnectionCallback isSubscription DownloadAllowedCallback)
59 { 64 {
60 setUpFilterEngine(this.ptr, isSubscriptionDownloadAllowedCallback); 65 setUpFilterEngine(this.ptr, isSubscriptionDownloadAllowedCallback);
(...skipping 28 matching lines...) Expand all
89 public void dispose() 94 public void dispose()
90 { 95 {
91 dtor(this.ptr); 96 dtor(this.ptr);
92 } 97 }
93 } 98 }
94 99
95 private final static native void registerNatives(); 100 private final static native void registerNatives();
96 101
97 private final static native long ctor(LogSystem logSystem, WebRequest webReque st, String basePath); 102 private final static native long ctor(LogSystem logSystem, WebRequest webReque st, String basePath);
98 103
99 private final static native void setUpJsEngine(long ptr, AppInfo appInfo); 104 private final static native void setUpJsEngine(long ptr, AppInfo appInfo, long v8IsolatePtr);
100 105
101 private final static native long getJsEnginePtr(long ptr); 106 private final static native long getJsEnginePtr(long ptr);
102 107
103 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti onCallback isSubscriptionDownloadAllowedCallback); 108 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti onCallback isSubscriptionDownloadAllowedCallback);
104 109
105 private final static native void ensureFilterEngine(long ptr); 110 private final static native void ensureFilterEngine(long ptr);
106 111
107 private final static native void dtor(long ptr); 112 private final static native void dtor(long ptr);
108 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld