Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[eagle] remove unused changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hpop1994 committed Apr 15, 2019
1 parent 38801dc commit b2ed94f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
4 changes: 1 addition & 3 deletions ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ namespace WeexCore

void CallNativeComponent(const char* pageId, const char* ref, const char *method,
const char *arguments, int argumentsLength, const char *options, int optionsLength) override;
#if OS_IOS
std::unique_ptr<ValueWithType> RegisterPluginModule(const char *name, const char *class_name, const char *version) override;
#endif


void SetTimeout(const char* callbackID, const char* time) override ;

void NativeLog(const char* str_array) override ;
Expand Down
2 changes: 0 additions & 2 deletions ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static void MergeBorderWidthValues(NSMutableDictionary* dict,
return result;
}

#if OS_IOS
std::unique_ptr<ValueWithType> IOSSide::RegisterPluginModule(const char *pcstr_name, const char *pcstr_class_name, const char *pcstr_version) {
ValueWithType *returnValue = new ValueWithType();
memset(returnValue, 0, sizeof(ValueWithType));
Expand Down Expand Up @@ -220,7 +219,6 @@ static void MergeBorderWidthValues(NSMutableDictionary* dict,

return std::unique_ptr<ValueWithType>(returnValue);
}
#endif
std::unique_ptr<ValueWithType> IOSSide::CallNativeModule(const char *page_id, const char *module, const char *method, const char *args, int args_length, const char *options, int options_length)
{
ValueWithType *returnValue = new ValueWithType();
Expand Down
3 changes: 1 addition & 2 deletions ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,8 @@ - (void)callBack:(NSString *)instanceId funcId:(NSString *)funcId params:(id)par
if (instance.wlasmRender) {
id<WXDataRenderHandler> dataRenderHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXDataRenderHandler)];
if (dataRenderHandler) {
id strongArgs = params ? [params copy]:@"\"{}\"";
WXPerformBlockOnComponentThread(^{
[dataRenderHandler invokeCallBack:instanceId function:funcId args:strongArgs keepAlive:keepAlive];
[dataRenderHandler invokeCallBack:instanceId function:funcId args:params ? [params copy]:@"\"{}\"" keepAlive:keepAlive];
});
}
else {
Expand Down
21 changes: 4 additions & 17 deletions weex_core/Source/core/bridge/platform/core_side_in_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ int CoreSideInPlatform::RefreshInstance(

std::string init_data = weex::base::to_utf8(params[1]->value.string->content,
params[1]->value.string->length);
auto handler = EagleBridge::GetInstance()->data_render_handler();
if (handler && handler->RefreshPage(instanceId, init_data)) {

if (EagleBridge::GetInstance()->data_render_handler()->RefreshPage(instanceId, init_data)) {
return true;
}
return ExecJS(instanceId, nameSpace, func, params);
Expand Down Expand Up @@ -443,13 +443,7 @@ int CoreSideInPlatform::CreateInstance(const char *instanceId, const char *func,
extendsApi.c_str(),params);
};
if (strcmp(render_strategy, "DATA_RENDER") == 0) {
auto handler = EagleBridge::GetInstance()->data_render_handler();
if(handler){
handler->CreatePage(script, instanceId, render_strategy, initData, exec_js);
}
else{
LOGE("DATA_RENDER mode should not be used if there is no data_render_handler");
}
EagleBridge::GetInstance()->data_render_handler()->CreatePage(script, instanceId, render_strategy, initData, exec_js);

return true;
} else if (strcmp(render_strategy, "DATA_RENDER_BINARY") == 0) {
Expand Down Expand Up @@ -481,14 +475,7 @@ int CoreSideInPlatform::CreateInstance(const char *instanceId, const char *func,
};
option = json11::Json(new_option).dump();
}

auto handler = EagleBridge::GetInstance()->data_render_handler();
if(handler){
handler->CreatePage(script, static_cast<size_t>(script_length), instanceId, option, env_str, initData, exec_js);
}
else{
LOGE("DATA_RENDER_BINARY mode should not be used if there is no data_render_handler");
}
EagleBridge::GetInstance()->data_render_handler()->CreatePage(script, static_cast<size_t>(script_length), instanceId, option, env_str, initData, exec_js);
return true;
}
}
Expand Down

0 comments on commit b2ed94f

Please sign in to comment.