Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
renderjs
Commits
be2d115f
Commit
be2d115f
authored
May 15, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove not needed asynchronous function calls.
parent
201fdb09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
19 deletions
+10
-19
renderjs.js
renderjs.js
+10
-19
No files found.
renderjs.js
View file @
be2d115f
...
@@ -1076,9 +1076,6 @@
...
@@ -1076,9 +1076,6 @@
queue
=
new
RSVP
.
Queue
();
queue
=
new
RSVP
.
Queue
();
clearGadgetInternalParameters
(
gadget_instance
);
clearGadgetInternalParameters
(
gadget_instance
);
// Trigger calling of all ready callback
// Trigger calling of all ready callback
function
ready_wrapper
()
{
return
gadget_instance
;
}
function
ready_executable_wrapper
(
fct
)
{
function
ready_executable_wrapper
(
fct
)
{
return
function
executeReadyWrapper
()
{
return
function
executeReadyWrapper
()
{
return
fct
.
call
(
gadget_instance
,
gadget_instance
);
return
fct
.
call
(
gadget_instance
,
gadget_instance
);
...
@@ -1090,8 +1087,6 @@
...
@@ -1090,8 +1087,6 @@
queue
.
push
(
ready_executable_wrapper
(
queue
.
push
(
ready_executable_wrapper
(
gadget_instance
.
constructor
.
__ready_list
[
i
]
gadget_instance
.
constructor
.
__ready_list
[
i
]
));
));
// Always return the gadget instance after ready function
queue
.
push
(
ready_wrapper
);
}
}
// Store local reference to the gadget instance
// Store local reference to the gadget instance
...
@@ -1114,11 +1109,13 @@
...
@@ -1114,11 +1109,13 @@
options
.
sandbox
);
options
.
sandbox
);
gadget_instance
.
element
.
_gadget
=
gadget_instance
;
gadget_instance
.
element
.
_gadget
=
gadget_instance
;
function
ready_wrapper
()
{
if
(
document
.
contains
(
gadget_instance
.
element
))
{
if
(
document
.
contains
(
gadget_instance
.
element
))
{
// Put a timeout
startService
(
gadget_instance
);
queue
.
push
(
startService
);
}
}
// Always return the gadget instance after ready function
// Always return the gadget instance after ready function
return
gadget_instance
;
}
queue
.
push
(
ready_wrapper
);
queue
.
push
(
ready_wrapper
);
return
queue
;
return
queue
;
...
@@ -1721,25 +1718,19 @@
...
@@ -1721,25 +1718,19 @@
var
i
,
var
i
,
ready_queue
=
new
RSVP
.
Queue
();
ready_queue
=
new
RSVP
.
Queue
();
function
ready_wrapper
()
{
return
root_gadget
;
}
function
ready_executable_wrapper
(
fct
)
{
function
ready_executable_wrapper
(
fct
)
{
return
function
wrapReadyFunction
(
g
)
{
return
function
wrapReadyFunction
()
{
return
fct
.
call
(
g
,
g
);
return
fct
.
call
(
root_gadget
,
root_gadget
);
};
};
}
}
TmpConstructor
.
ready
(
function
startServiceInReady
()
{
TmpConstructor
.
ready
(
function
startServiceInReady
()
{
return
startService
(
this
);
return
startService
(
root_gadget
);
});
});
ready_queue
.
push
(
ready_wrapper
);
for
(
i
=
0
;
i
<
TmpConstructor
.
__ready_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
TmpConstructor
.
__ready_list
.
length
;
i
+=
1
)
{
// Put a timeout?
// Put a timeout?
ready_queue
ready_queue
.
push
(
ready_executable_wrapper
(
TmpConstructor
.
__ready_list
[
i
]))
.
push
(
ready_executable_wrapper
(
TmpConstructor
.
__ready_list
[
i
]));
// Always return the gadget instance after ready function
.
push
(
ready_wrapper
);
}
}
return
ready_queue
;
return
ready_queue
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment