Fix when print log string which contains special control characters in doric,cause native crash
This commit is contained in:
56
doric-web/dist/index.js
vendored
56
doric-web/dist/index.js
vendored
@@ -1278,16 +1278,6 @@ var doric = (function (exports) {
|
||||
}
|
||||
}
|
||||
class Context {
|
||||
hookBeforeNativeCall() {
|
||||
if (this.entity && Reflect.has(this.entity, 'hookBeforeNativeCall')) {
|
||||
Reflect.apply(Reflect.get(this.entity, 'hookBeforeNativeCall'), this.entity, []);
|
||||
}
|
||||
}
|
||||
hookAfterNativeCall() {
|
||||
if (this.entity && Reflect.has(this.entity, 'hookAfterNativeCall')) {
|
||||
Reflect.apply(Reflect.get(this.entity, 'hookAfterNativeCall'), this.entity, []);
|
||||
}
|
||||
}
|
||||
constructor(id) {
|
||||
this.callbacks = new Map;
|
||||
this.classes = new Map;
|
||||
@@ -1322,6 +1312,16 @@ var doric = (function (exports) {
|
||||
}
|
||||
});
|
||||
}
|
||||
hookBeforeNativeCall() {
|
||||
if (this.entity && Reflect.has(this.entity, 'hookBeforeNativeCall')) {
|
||||
Reflect.apply(Reflect.get(this.entity, 'hookBeforeNativeCall'), this.entity, []);
|
||||
}
|
||||
}
|
||||
hookAfterNativeCall() {
|
||||
if (this.entity && Reflect.has(this.entity, 'hookAfterNativeCall')) {
|
||||
Reflect.apply(Reflect.get(this.entity, 'hookAfterNativeCall'), this.entity, []);
|
||||
}
|
||||
}
|
||||
callNative(namespace, method, args) {
|
||||
const callbackId = uniqueId('callback');
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -1776,24 +1776,6 @@ function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
class View {
|
||||
callback2Id(f) {
|
||||
const id = uniqueId('Function');
|
||||
this.callbacks.set(id, f);
|
||||
return id;
|
||||
}
|
||||
id2Callback(id) {
|
||||
let f = this.callbacks.get(id);
|
||||
if (f === undefined) {
|
||||
f = Reflect.get(this, id);
|
||||
}
|
||||
return f;
|
||||
}
|
||||
findViewByTag(tag) {
|
||||
if (tag === this.tag) {
|
||||
return this;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
constructor() {
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
@@ -1825,6 +1807,24 @@ class View {
|
||||
}
|
||||
});
|
||||
}
|
||||
callback2Id(f) {
|
||||
const id = uniqueId('Function');
|
||||
this.callbacks.set(id, f);
|
||||
return id;
|
||||
}
|
||||
id2Callback(id) {
|
||||
let f = this.callbacks.get(id);
|
||||
if (f === undefined) {
|
||||
f = Reflect.get(this, id);
|
||||
}
|
||||
return f;
|
||||
}
|
||||
findViewByTag(tag) {
|
||||
if (tag === this.tag) {
|
||||
return this;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
/** Anchor start*/
|
||||
get left() {
|
||||
return this.x;
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user