Skip to content

Commit

Permalink
Rename method in order to work around Dalvik VM bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix von Ferey committed May 3, 2017
1 parent d073e81 commit d89a87e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected boolean exec() {
this.blocker = null;
setCurrent(this);
try {
return doExec();
return internalDoExec();
} finally {
setTarget(currentThread, oldTarget); // can't use enclosing for the same reason can't nullify enclosing. See below.
//enclosing = null; -- can't nullify enclosing here, because by the time we get here, his task may have been re-scheduled and enclosing re-set
Expand Down Expand Up @@ -111,7 +111,7 @@ public static Object getTarget(Thread thread) {
return ThreadAccess.getTarget(thread);
}

boolean doExec() {
boolean internalDoExec() { // Do not call this method "doExec()", as (due to bug https://code.google.com/p/android/issues/detail?id=60406) on some Android VMs, callers of this method will actually call FiberForkJoinScheduler$FiberForkJoinTask.doExec()
try {
onExec();
boolean res = exec1();
Expand Down Expand Up @@ -139,15 +139,15 @@ ParkableForkJoinTask getEnclosing() {

protected void onExec() {
if (Debug.isDebug())
record("doExec", "executing %s", this);
record("internalDoExec", "executing %s", this);
}

protected void onCompletion(boolean res) {
record("doExec", "done normally %s", this, Boolean.valueOf(res));
record("internalDoExec", "done normally %s", this, Boolean.valueOf(res));
}

protected void onException(Throwable t) {
record("doExec", "exception in %s - %s, %s", this, t, t.getStackTrace());
record("internalDoExec", "exception in %s - %s, %s", this, t, t.getStackTrace());
throw Exceptions.rethrow(t);
}

Expand All @@ -157,7 +157,7 @@ protected void parking(boolean yield) {

protected void onParked(boolean yield) {
if (Debug.isDebug())
record("doExec", "parked " + (yield ? "(yield)" : "(park)") + " %s", this);
record("internalDoExec", "parked " + (yield ? "(yield)" : "(park)") + " %s", this);
}

protected Object getUnparker() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected boolean exec() {
this.blocker = null;
setCurrent(this);
try {
return doExec();
return internalDoExec();
} finally {
setTarget(currentThread, oldTarget); // can't use enclosing for the same reason can't nullify enclosing. See below.
//enclosing = null; -- can't nullify enclosing here, because by the time we get here, his task may have been re-scheduled and enclosing re-set
Expand Down Expand Up @@ -111,7 +111,7 @@ public static Object getTarget(Thread thread) {
return ThreadAccess.getTarget(thread);
}

boolean doExec() {
boolean internalDoExec() { // Do not call this method "doExec()", as (due to bug https://code.google.com/p/android/issues/detail?id=60406) on some Android VMs, callers of this method will actually call FiberForkJoinScheduler$FiberForkJoinTask.doExec()
try {
onExec();
boolean res = exec1();
Expand Down Expand Up @@ -139,15 +139,15 @@ ParkableForkJoinTask getEnclosing() {

protected void onExec() {
if (Debug.isDebug())
record("doExec", "executing %s", this);
record("internalDoExec", "executing %s", this);
}

protected void onCompletion(boolean res) {
record("doExec", "done normally %s", this, Boolean.valueOf(res));
record("internalDoExec", "done normally %s", this, Boolean.valueOf(res));
}

protected void onException(Throwable t) {
record("doExec", "exception in %s - %s, %s", this, t, t.getStackTrace());
record("internalDoExec", "exception in %s - %s, %s", this, t, t.getStackTrace());
throw Exceptions.rethrow(t);
}

Expand All @@ -157,7 +157,7 @@ protected void parking(boolean yield) {

protected void onParked(boolean yield) {
if (Debug.isDebug())
record("doExec", "parked " + (yield ? "(yield)" : "(park)") + " %s", this);
record("internalDoExec", "parked " + (yield ? "(yield)" : "(park)") + " %s", this);
}

protected Object getUnparker() {
Expand Down

0 comments on commit d89a87e

Please sign in to comment.