gluploadelement: Avoid race condition of base class' context.
The base class' context may change, we should use the common API with lock to access it, rather than the just directly access the struct field.
The base class' context may change, we should use the common API with lock to access it, rather than the just directly access the struct field.